diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-09-19 02:36:20 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2014-09-19 02:36:20 +0000 |
commit | 46614494edf1602ef9ae094992ffe08060f94c97 (patch) | |
tree | 59b06f04c9d2f5422747dd4240291d812066e1a9 /converter | |
parent | b649804cfddd20cf31630f99fe6af4c710085a27 (diff) | |
download | netpbm-mirror-46614494edf1602ef9ae094992ffe08060f94c97.tar.gz netpbm-mirror-46614494edf1602ef9ae094992ffe08060f94c97.tar.xz netpbm-mirror-46614494edf1602ef9ae094992ffe08060f94c97.zip |
Properly fix compiler warning about array bounds violation; fix in 2010 caused incorrect output
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2282 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter')
-rw-r--r-- | converter/other/cameratopam/identify.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/converter/other/cameratopam/identify.c b/converter/other/cameratopam/identify.c index cc6a2d8e..d9b96959 100644 --- a/converter/other/cameratopam/identify.c +++ b/converter/other/cameratopam/identify.c @@ -237,15 +237,8 @@ adobe_coeff() for (i=0; i < sizeof table / sizeof *table; i++) if (!strncmp (name, table[i].prefix, strlen(table[i].prefix))) { unsigned int j; - /* I have no idea what this code is supposed to do, but the way I - found it, it was setting the first 12 elements, instead of 4, - of cm[0]. But cm[0] has only 3 elements! So I just changed it - to use the first 3 "trans" values and ignore the rest. I - don't know if that produces useful results, but at least it - cures the array bounds violation. -Bryan 2010.04.09. - */ - for (j=0; j < 3; j++) - cm[0][j] = table[i].trans[j]; + for (j=0; j < 12; j++) + cm[j/4][j%4] = table[i].trans[j]; dng_coeff (cc, cm, xyz); break; } |