]> granicus.if.org Git - libjpeg-turbo/commitdiff
Oops. Need to handle cases in which num_components > n
authorDRC <dcommander@users.sourceforge.net>
Sat, 28 Jan 2012 01:19:23 +0000 (01:19 +0000)
committerDRC <dcommander@users.sourceforge.net>
Sat, 28 Jan 2012 01:19:23 +0000 (01:19 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@751 632fc199-4ca6-4c93-a231-07263d6284db

jdmarker.c

index beb23035b724864fd3ecfdaecdcd588b08adb466..d8dcba98fa06a6f25f8d0cfcd37900090457066a 100644 (file)
@@ -323,7 +323,7 @@ get_sos (j_decompress_ptr cinfo)
 
   /* Collect the component-spec parameters */
 
-  for (i = 0; i < n; i++)
+  for (i = 0; i < cinfo->num_components; i++)
     cinfo->cur_comp_info[i] = NULL;
 
   for (i = 0; i < n; i++) {