projects
/
platform
/
upstream
/
libexif.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4fce6a
)
Avoid compiler warning signed/unsigned int mismatch.
author
Jan Patera
<patera@pictview.com>
Sat, 26 Sep 2009 08:18:20 +0000
(10:18 +0200)
committer
Jan Patera
<patera@pictview.com>
Sat, 26 Sep 2009 08:18:20 +0000
(10:18 +0200)
But do we really need the checks "if ((i+1)*4 > entry->size)"?
libexif/pentax/mnote-pentax-entry.c
patch
|
blob
|
history
diff --git
a/libexif/pentax/mnote-pentax-entry.c
b/libexif/pentax/mnote-pentax-entry.c
index
d42e653
..
aa2cc65
100644
(file)
--- a/
libexif/pentax/mnote-pentax-entry.c
+++ b/
libexif/pentax/mnote-pentax-entry.c
@@
-417,7
+417,7
@@
mnote_pentax_entry_get_value (MnotePentaxEntry *entry,
case EXIF_FORMAT_SHORT:
{
const unsigned char *data = entry->data;
- size_t len = strlen(val);
+ size_t
i,
len = strlen(val);
for(i=0; i<entry->components; i++) {
if ((i+1)*2 > entry->size) {
// Prevent buffer overflow
@@
-433,7
+433,7
@@
mnote_pentax_entry_get_value (MnotePentaxEntry *entry,
case EXIF_FORMAT_LONG:
{
const unsigned char *data = entry->data;
- size_t len = strlen(val);
+ size_t
i,
len = strlen(val);
for(i=0; i<entry->components; i++) {
if ((i+1)*4 > entry->size) {
// Prevent buffer overflow