mirror of
https://github.com/php/php-src.git
synced 2026-04-24 00:18:23 +02:00
Fix a possible segfault (Thanks to Sebastian for catching it)
This commit is contained in:
+10
-3
@@ -89,9 +89,16 @@ extern int le_fp;
|
||||
efree(key); \
|
||||
}
|
||||
|
||||
#define SEARCHCR() do { \
|
||||
for (p = READPTR(sock), pe = p + MIN(TOREAD(sock), maxlen); \
|
||||
*p != '\n'; ) if (++p >= pe) { p = NULL; break; } \
|
||||
#define SEARCHCR() do { \
|
||||
if (TOREAD(sock)) { \
|
||||
for (p = READPTR(sock), pe = p + MIN(TOREAD(sock), maxlen); \
|
||||
*p != '\n'; ) \
|
||||
if (++p >= pe) { \
|
||||
p = NULL; \
|
||||
break; \
|
||||
} \
|
||||
} else \
|
||||
p = NULL; \
|
||||
} while (0)
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
|
||||
Reference in New Issue
Block a user