]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix possible seg fault in db_get_int_handler in accurate code
authorKern Sibbald <kern@sibbald.com>
Wed, 26 Aug 2009 16:55:58 +0000 (18:55 +0200)
committerKern Sibbald <kern@sibbald.com>
Wed, 26 Aug 2009 16:55:58 +0000 (18:55 +0200)
bacula/src/cats/sql_get.c

index ba675ea67e3fd4fe12409fcc6beac8fb97f86a88..6098bdfa32bbb5cd9170e7c0a7e147f9f00b55db 100644 (file)
@@ -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, ",");
       }