diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2013-01-29 09:20:25 +0000 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2013-01-29 09:20:25 +0000 |
commit | e29e12fba8c055f01d09db82c606e5cf4e542cf8 (patch) | |
tree | 39405b1cd6c43fb32562f0683a702982cede798d /camlibs/ax203 | |
parent | ff17e3c9c5ddb14091765ff5d74b45b75e627dd2 (diff) | |
download | libgphoto2-e29e12fba8c055f01d09db82c606e5cf4e542cf8.tar.gz |
swap check fo array boundary and array access to avoid overread
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14214 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'camlibs/ax203')
-rw-r--r-- | camlibs/ax203/tinyjpeg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/camlibs/ax203/tinyjpeg.c b/camlibs/ax203/tinyjpeg.c index 4ca43b8b0..f4b3faa25 100644 --- a/camlibs/ax203/tinyjpeg.c +++ b/camlibs/ax203/tinyjpeg.c @@ -940,7 +940,7 @@ void tinyjpeg_get_size(struct jdec_private *priv, unsigned int *width, unsigned int tinyjpeg_get_components(struct jdec_private *priv, unsigned char **components) { int i; - for (i=0; priv->components[i] && i<COMPONENTS; i++) + for (i=0; i<COMPONENTS && priv->components[i]; i++) components[i] = priv->components[i]; return 0; } |