From 11f5e141f6f38f282b6a37bb7e3f3e36056b28f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Milo=C5=A1=20Mula=C4=8D?= Date: Fri, 14 Mar 2008 15:10:27 +0000 Subject: [PATCH] NULL-ize string variables set error in case of malformed notifID --- org.glite.lb.server/src/notification.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/org.glite.lb.server/src/notification.c b/org.glite.lb.server/src/notification.c index f3e4e56..68584ff 100644 --- a/org.glite.lb.server/src/notification.c +++ b/org.glite.lb.server/src/notification.c @@ -614,14 +614,16 @@ static int update_notif( const char *dest, const char *valid) { - char *nid_s = NULL, - *host = NULL, - *stmt, *aux; - int ret, port; + char *nid_s = NULL, *host = NULL, + *stmt = NULL, *aux = NULL; + int ret, port; if ( !(nid_s = edg_wll_NotifIdGetUnique(nid)) ) + { + edg_wll_SetError(ctx, EINVAL, "Malformed notification ID."); goto cleanup; + } /* Format SQL update string * (Only the owner could update the notification registration) -- 1.8.2.3