From ecc7a9cf3f1f7bb3d1d97796c8b38ae274e71073 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 30 Oct 2011 16:17:07 +0000 Subject: [PATCH] In get_last_url(), add a missing check for strdup()'s return code --- filters.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/filters.c b/filters.c index c4bfd9a7..54c2c6f4 100644 --- a/filters.c +++ b/filters.c @@ -1,4 +1,4 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.147 2011/10/30 16:15:43 fabiankeil Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.148 2011/10/30 16:16:07 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/filters.c,v $ @@ -1131,6 +1131,12 @@ char *get_last_url(char *subject, const char *redirect_mode) { freez(found); found = strdup(h); + if (found == NULL) + { + log_error(LOG_LEVEL_ERROR, + "Out of memory while searching for redirects."); + return NULL; + } } token = strtok(NULL, "?&"); } -- 2.49.0