public
Description: Upload progress module for apache
Homepage: http://drogomir.com/blog/2008/6/18/upload-progress-bar-with-mod_passenger-and-apache
Clone URL: git://github.com/drogus/apache-upload-progress-module.git
Search Repo:
Click here to lend your support to: apache-upload-progress-module and make a donation at www.pledgie.com !
Don't copy key if there was error with allocating memory
drogus (author)
Wed Jul 02 09:50:21 -0700 2008
commit  dfb0563a919ae47a09308c8be67014de4ded942f
tree    4abffd70cb2584a8b6405f1fbfe5144d479935cf
parent  9a206ba24adb8a071c4e5f7c1ffdfeb63c4ba103
...
346
347
348
349
 
 
 
350
351
352
...
346
347
348
 
349
350
351
352
353
354
0
@@ -346,7 +346,9 @@ upload_progress_node_t *store_node(ServerConfig *config, const char *key) {
0
   
0
   block = apr_rmm_calloc(config->cache_rmm, strlen(key)+1);
0
   node->key = block ? (char *)apr_rmm_addr_get(config->cache_rmm, block) : NULL;
0
- sprintf(node->key, "%s\0", key);
0
+ if(node->key != NULL) {
0
+ sprintf(node->key, "%s\0", key);
0
+ }
0
   return node;
0
 }
0
 

Comments

    No one has commented yet.