Browse code

Correction to cli_vba_scandir to account for change from 0-indexed to 1-indexed hash counts, and to remove extraneous hashcnt--, an oversite from the commit fixing fuzz - 12166.

Micah Snyder authored on 2019/03/07 10:46:00
Showing 1 changed files
... ...
@@ -1246,13 +1246,12 @@ static int cli_vba_scandir(const char *dirname, cli_ctx *ctx, struct uniq *U)
1246 1246
 
1247 1247
         for (i = 0; i < vba_project->count; i++)
1248 1248
         {
1249
-            for (j = 0; (unsigned int)j < vba_project->colls[i]; j++)
1249
+            for (j = 1; (unsigned int)j <= vba_project->colls[i]; j++)
1250 1250
             {
1251 1251
                 snprintf(vbaname, 1024, "%s" PATHSEP "%s_%u", vba_project->dir, vba_project->name[i], j);
1252 1252
                 vbaname[sizeof(vbaname) - 1] = '\0';
1253 1253
                 fd = open(vbaname, O_RDONLY | O_BINARY);
1254 1254
                 if (fd == -1) {
1255
-                    hashcnt--;
1256 1255
                     continue;
1257 1256
                 }
1258 1257
                 cli_dbgmsg("VBADir: Decompress VBA project '%s_%u'\n", vba_project->name[i], j);