Commit f8cdec1d authored by Federico G. Schwindt's avatar Federico G. Schwindt

Tighten up checks

parent 932ed4af
......@@ -243,6 +243,9 @@ VTIM_parse(const char *p)
int hour = 0, min = 0, sec = 0;
int d, leap;
if (p == NULL || *p == '\0')
FAIL();
while (*p == ' ')
p++;
......
......@@ -194,8 +194,6 @@ vmod_time(VRT_CTX, VCL_STRING p, VCL_TIME d)
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (p == NULL)
return (d);
r = VTIM_parse(p);
if (r)
return (r);
......
......@@ -90,6 +90,9 @@ vmod_fileread(VRT_CTX, struct vmod_priv *priv,
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
AN(priv);
if (file_name == NULL)
return (NULL);
if (priv->priv != NULL) {
CAST_OBJ_NOTNULL(frf, priv->priv, CACHED_FILE_MAGIC);
if (!strcmp(file_name, frf->file_name))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment