]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldpcli: don't free input line
authorVincent Bernat <bernat@luffy.cx>
Tue, 14 May 2013 20:36:36 +0000 (22:36 +0200)
committerVincent Bernat <bernat@luffy.cx>
Tue, 14 May 2013 20:37:22 +0000 (22:37 +0200)
Line returned by `fgetln()` should not be freed, including when we use
the implementation we provide in `fgetln.c`. This fix an heap
corruption.

NEWS
src/client/lldpcli.c

diff --git a/NEWS b/NEWS
index 7a0a9701fe9d5d7c968d888f076f951d0993b7fa..fabe63d93219086fd9aaa5855f7dd985ff3b693d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+lldpd (0.7.4)
+  * Fixes:
+    + Segfault in lldpcli.
+
 lldpd (0.7.3)
   * Features:
     + DragonFly BSD support.
index 189c0de5b38d7c1bf7c60141aa8204e678e9fd28..3547039d54dd105e68d3f1eb25833dc5fe279ff3 100644 (file)
@@ -476,7 +476,6 @@ main(int argc, char *argv[])
                                        line[len - 1] = '\0';
                                        parse_and_exec(conn, fmt, line);
                                }
-                               free(line);
                        }
                        fclose(file);
                } else {