From: Kern Sibbald Date: Wed, 26 Aug 2009 16:55:58 +0000 (+0200) Subject: Fix possible seg fault in db_get_int_handler in accurate code X-Git-Tag: Release-5.0.0~325^2~8 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=835ba5a09054683475dc3822a67eb32233ef307e;p=bacula%2Fbacula Fix possible seg fault in db_get_int_handler in accurate code --- diff --git a/bacula/src/cats/sql_get.c b/bacula/src/cats/sql_get.c index ba675ea67e..6098bdfa32 100644 --- a/bacula/src/cats/sql_get.c +++ b/bacula/src/cats/sql_get.c @@ -1193,7 +1193,7 @@ bail_out: int db_get_int_handler(void *ctx, int num_fields, char **row) { POOLMEM *ret = (POOLMEM *)ctx; - if (num_fields == 1) { + if (num_fields == 1 && row[0]) { if (ret[0]) { pm_strcat(ret, ","); }