diff options
author | 2009-11-12 20:16:37 +0000 | |
---|---|---|
committer | 2009-11-12 20:16:37 +0000 | |
commit | 8f7d7fbf626d875c6bf5c2b5de0a8a89bcfc4ab1 (patch) | |
tree | f3cd94c43398b123bb5e177a443fa13a2f2e6ec1 /usr.bin/tmux/cmd-confirm-before.c | |
parent | Do realloc() the paranoid way, at the very least to once again educate (diff) | |
download | wireguard-openbsd-8f7d7fbf626d875c6bf5c2b5de0a8a89bcfc4ab1.tar.xz wireguard-openbsd-8f7d7fbf626d875c6bf5c2b5de0a8a89bcfc4ab1.zip |
Avoid using the trick of malloc'ing more than a struct to grow the array
of the last element. Bad technique. Use a pointer to the array. The
author (or later people) will often not pay attention to the consequences
of structure padding & alignment issues when they add new fields to the
base structure, and there will be fireworks.
tested by jasper, too
Diffstat (limited to 'usr.bin/tmux/cmd-confirm-before.c')
0 files changed, 0 insertions, 0 deletions