/* Prepare the work for the next url in the list */
/* after the closing bracket >, ignore space, comments and tabs */
- for (;*buf == ' ' || *buf == '(' || *buf == '\t'; buf++)
+ for (;*buf && *buf && (buf == ' ' || *buf == '(' || *buf == '\t'); buf++)
if (*buf == '(')
for (;*buf != ')' && *buf != 0x00; buf++);
+
+ if (!buf) {
+ *buffer = NULL;
+ return;
+ }
+
/* now first non space, non comment must be a comma */
if (*buf != ',')
for (;*buf != 0x00; buf++);