mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-13 12:57:04 +02:00
modified search_header_end() and use the value of n instead of strlen(p)
This commit is contained in:
@ -20,7 +20,7 @@
|
||||
int search_header_end(char *p, int n){
|
||||
int hdr_len=0;
|
||||
|
||||
if(strlen(p) < 5) return hdr_len;
|
||||
if(n < 5) return hdr_len;
|
||||
|
||||
for(; *p; p++){
|
||||
if(hdr_len < n-2 && *p == '\n' && *(p+1) == '\r' && *(p+2) == '\n'){ hdr_len += 3; return MAX(hdr_len, n); }
|
||||
|
Reference in New Issue
Block a user