]> granicus.if.org Git - graphviz/commit
Fixed use of unitialized variable in lefty
authorErwin Janssen <erwinjanssen@outlook.com>
Sat, 7 Jan 2017 11:51:01 +0000 (12:51 +0100)
committerErwin Janssen <erwinjanssen@outlook.com>
Tue, 17 Jan 2017 18:14:54 +0000 (19:14 +0100)
commit1ef7b1f762ac3147daf2a41f2072687abc6d6945
tree35f4e8e97129cc7da94f2f41df29c6a3d23edb4d
parent2d95aab626184f35f779bbd02a000a992826047a
Fixed use of unitialized variable in lefty

In the file cmd/lefty/ws/x11/gquery.c, function Gqwpopaction:
THe char c is declared without initializer, giving it a unpredictable
value. If the next if statement takes the false branch, the function where
c is set is not executed. The next if statement then checks `c != 13`, but
because C could have any value, the behavior is unpredictable.
Initializing c with a known value, such as 0, fixes the problem.
cmd/lefty/ws/x11/gquery.c