|
@@ -178,6 +178,9 @@ static int get_date_field(char **p, u32 * value)
|
|
* Try to find delimeter, only to insert null. The end of the
|
|
* Try to find delimeter, only to insert null. The end of the
|
|
* string won't have one, but is still valid.
|
|
* string won't have one, but is still valid.
|
|
*/
|
|
*/
|
|
|
|
+ if (*p == NULL)
|
|
|
|
+ return result;
|
|
|
|
+
|
|
next = strpbrk(*p, "- :");
|
|
next = strpbrk(*p, "- :");
|
|
if (next)
|
|
if (next)
|
|
*next++ = '\0';
|
|
*next++ = '\0';
|
|
@@ -190,6 +193,8 @@ static int get_date_field(char **p, u32 * value)
|
|
|
|
|
|
if (next)
|
|
if (next)
|
|
*p = next;
|
|
*p = next;
|
|
|
|
+ else
|
|
|
|
+ *p = NULL;
|
|
|
|
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|