Skip to content

Commit

Permalink
Sqasch nasl/nasl_misc_funcs.c
Browse files Browse the repository at this point in the history
  • Loading branch information
y0urself committed Sep 1, 2021
1 parent 247ff6a commit f5140f0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nasl/nasl_misc_funcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <glib.h>
#include <gvm/util/compressutils.h> /* for gvm_uncompress */
#include <gvm/util/kb.h> /* for KB_TYPE_STR */
#include <stdbool.h> /* for boolean */
#include <stdlib.h> /* for lrand48 */
#include <string.h> /* for bzero */
#include <sys/time.h> /* for gettimeofday */
Expand Down Expand Up @@ -686,15 +687,19 @@ nasl_localtime (lex_ctxt *lexic)

success = false;
if (utc)
{
if (gmtime_r (&tictac, &ptm) == NULL)
{
success = true;
}
}
else
{
if (localtime_r (&tictac, &ptm) == NULL)
{
success = true;
}
}

if (!success)
{
Expand Down

0 comments on commit f5140f0

Please sign in to comment.