summaryrefslogtreecommitdiff
path: root/src/bin/ethumb_client/ethumbd.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-13 20:46:10 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-13 21:26:05 +0900
commit83615efe6ae1878fd368e352d3ca85dca01b58e0 (patch)
treeba2dee84aac5eaf05d9f20cf8eefa6ca88b5466b /src/bin/ethumb_client/ethumbd.c
parentabb780bf5f8730cc03b0fcf62d0a10e5ae50aa6a (diff)
ethumbd - fix possible out of bounds access to work table
this should fix CID 1039314 in case an unsused table slot cannot be found. this should actualyl never happen because table expands/allocs zero out new entires so they are "unused".
Diffstat (limited to '')
-rw-r--r--src/bin/ethumb_client/ethumbd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bin/ethumb_client/ethumbd.c b/src/bin/ethumb_client/ethumbd.c
index a0313c57e8..5d583688b7 100644
--- a/src/bin/ethumb_client/ethumbd.c
+++ b/src/bin/ethumb_client/ethumbd.c
@@ -811,6 +811,12 @@ _ethumb_table_append(Ethumbd *ed)
811 break; 811 break;
812 } 812 }
813 813
814 if (i >= q->max_count)
815 {
816 CRIT("cannot find free table slot in table of %i", q->max_count);
817 return -1;
818 }
819
814 snprintf(buf, sizeof(buf), "%s/%d", _ethumb_dbus_path, i); 820 snprintf(buf, sizeof(buf), "%s/%d", _ethumb_dbus_path, i);
815 q->table[i].used = 1; 821 q->table[i].used = 1;
816 q->table[i].path = eina_stringshare_add(buf); 822 q->table[i].path = eina_stringshare_add(buf);