summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2015-11-03 14:20:00 +0000
committerkrw <krw@openbsd.org>2015-11-03 14:20:00 +0000
commita033f675b042c0fb414e8e09d0b37f9dcd4e43f1 (patch)
tree877ac6ab099aef006dfe789957d51e43b9f7044a /sys
parentAdd & use a #define GPTPARTNAMESIZE rather than the magic number (diff)
downloadwireguard-openbsd-a033f675b042c0fb414e8e09d0b37f9dcd4e43f1.tar.xz
wireguard-openbsd-a033f675b042c0fb414e8e09d0b37f9dcd4e43f1.zip
Don't allow the user to enter GPT partition names too large to fit
in the GPT partition structure. And don't run off the end of the name buffer by confusing sizeof() with the number of elements in an array. Use the new GPTPARTNAMESIZE #define instead. While here, zap the old partition name before setting the new one, lest a short new name leave bits of an old long name in place. Originally spotted by jsg@ and his friend cppcheck. ok jsg@ for slightly different version.
Diffstat (limited to 'sys')
0 files changed, 0 insertions, 0 deletions