mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 06:10:12 +01:00
modified search_header_end() and use the value of n instead of strlen(p)
This commit is contained in:
parent
971d43020c
commit
e6f3877378
5
CREDITS
Normal file
5
CREDITS
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
The FSF.hu Foundation (http://fsf.hu/) supported and donated piler within the
|
||||||
|
"Free Software Application 2011 project." (http://fsf.hu/2011/09/27/szabad-szoftver-palyazat-2011/)
|
||||||
|
|
||||||
|
Nemeth Adam reviewed the web interface, and gave lots of useful hints and insights to
|
||||||
|
improve the web ui of piler.
|
@ -20,7 +20,7 @@
|
|||||||
int search_header_end(char *p, int n){
|
int search_header_end(char *p, int n){
|
||||||
int hdr_len=0;
|
int hdr_len=0;
|
||||||
|
|
||||||
if(strlen(p) < 5) return hdr_len;
|
if(n < 5) return hdr_len;
|
||||||
|
|
||||||
for(; *p; p++){
|
for(; *p; p++){
|
||||||
if(hdr_len < n-2 && *p == '\n' && *(p+1) == '\r' && *(p+2) == '\n'){ hdr_len += 3; return MAX(hdr_len, n); }
|
if(hdr_len < n-2 && *p == '\n' && *(p+1) == '\r' && *(p+2) == '\n'){ hdr_len += 3; return MAX(hdr_len, n); }
|
||||||
|
Loading…
Reference in New Issue
Block a user