summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--src/utils.c4
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7c2ecfb..ec517ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+git HEAD
+
+ * Fix double-free/OOB-write in E17 IPC. This only affects the
+ background setting options and requires a malicious X11 app to run
+ alongside feh and pretend to be an E17 window manager.
+ * Fix image-specific format specifiers not being updated correctly in
+ thumbnail mode window titles
+ * Fix memory leak when closing images opened from thumbnail mode
+
Thu, 16 Feb 2017 23:05:39 +0100 Daniel Friesel <derf+feh@finalrewind.org>
* Release v2.18.2
diff --git a/src/utils.c b/src/utils.c
index bd189d3..2c0809c 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -183,14 +183,14 @@ char *ereadfile(char *path)
{
char buffer[4096];
FILE *fp;
- int count;
+ size_t count;
fp = fopen(path, "r");
if (!fp)
return NULL;
count = fread(buffer, sizeof(char), sizeof(buffer) - 1, fp);
- if (buffer[count - 1] == '\n')
+ if (count > 0 && buffer[count - 1] == '\n')
buffer[count - 1] = '\0';
else
buffer[count] = '\0';