mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 14:31:20 +03:00
Revert "make urldb internal parse macros less prone to control flow errors"
This reverts commit 718da3ffff
.
These macros are used in a way that causes safe macros to break
This commit is contained in:
parent
e182a4d67c
commit
a88254897b
@ -3796,7 +3796,7 @@ void urldb_load_cookies(const char *filename)
|
||||
if (!fp)
|
||||
return;
|
||||
|
||||
#define FIND_T do { \
|
||||
#define FIND_T { \
|
||||
for (; *p && *p != '\t'; p++) \
|
||||
; /* do nothing */ \
|
||||
if (p >= end) { \
|
||||
@ -3804,16 +3804,16 @@ void urldb_load_cookies(const char *filename)
|
||||
continue; \
|
||||
} \
|
||||
*p++ = '\0'; \
|
||||
} while(0)
|
||||
}
|
||||
|
||||
#define SKIP_T do { \
|
||||
#define SKIP_T { \
|
||||
for (; *p && *p == '\t'; p++) \
|
||||
; /* do nothing */ \
|
||||
if (p >= end) { \
|
||||
LOG("Overran input"); \
|
||||
continue; \
|
||||
} \
|
||||
} while(0)
|
||||
}
|
||||
|
||||
while (fgets(s, sizeof s, fp)) {
|
||||
char *p = s, *end = 0,
|
||||
|
Loading…
Reference in New Issue
Block a user