# HG changeset patch # User bertrand # Date 991730791 0 # Node ID 2803b7076c83595f66e0912b683181facc63e6a2 # Parent 435feedf9f89fb70b4109100d15b57f71dbc7e37 Checked the length arg when appending data. diff -r 435feedf9f89 -r 2803b7076c83 http.c --- a/http.c Tue Jun 05 08:42:16 2001 +0000 +++ b/http.c Tue Jun 05 08:46:31 2001 +0000 @@ -40,7 +40,7 @@ int http_response_append( HTTP_header_t *http_hdr, char *response, int length ) { char *ptr = NULL; - if( http_hdr==NULL || response==NULL ) return -1; + if( http_hdr==NULL || response==NULL || length<0 ) return -1; ptr = (char*)malloc( http_hdr->buffer_size+length ); if( ptr==NULL ) { printf("Memory allocation failed\n");