s3-spoolss: Fix GetPrinter level 101.
authorGünther Deschner <gd@samba.org>
Mon, 23 Nov 2009 15:54:34 +0000 (16:54 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 23 Nov 2009 15:56:03 +0000 (16:56 +0100)
Guenther

source3/rpc_server/srv_spoolss_nt.c

index 4f3bf73..072090b 100644 (file)
@@ -4946,7 +4946,7 @@ static WERROR spoolss_DriverFileInfo_from_driver(TALLOC_CTX *mem_ctx,
                count++;
        }
 
-       for (i=0; driver->info3.dependent_files[i][0] != '\0'; i++) {
+       for (i=0; driver->info3.dependent_files[i] && driver->info3.dependent_files[i][0] != '\0'; i++) {
                info = TALLOC_REALLOC_ARRAY(mem_ctx, info,
                                            struct spoolss_DriverFileInfo,
                                            count + 1);