]> granicus.if.org Git - graphviz/commit
fix latent invalid pointer reference
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 11 Oct 2020 18:49:30 +0000 (11:49 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 21 Oct 2020 00:38:30 +0000 (17:38 -0700)
commit5c9958047d05129dd23b338e8a7f078f18db4d80
tree05403e45c1041aace529eafbf7f52fa790a95f66
parent292db7f5635edca936db24f2de2548db7150402c
fix latent invalid pointer reference

At the point at which this code appears, trnum can be negative. This is latent
and does not cause a segfault because the compiler simply calculates a memory
address to store into t, without doing any actual dereferences. However,
debugging #56 revealed this invalid reference, which is undefined behavior with
respect to the C standard.
lib/ortho/partition.c