diff options
| author | Michael Brown | 2008-11-07 04:46:21 +0100 |
|---|---|---|
| committer | Michael Brown | 2008-11-07 04:48:29 +0100 |
| commit | ed196a3ed26cc9aaa034a6451ee1c789c93dfb68 (patch) | |
| tree | 3d47ccf813855551a2ee7444ba228ce294c76de1 /src/drivers | |
| parent | [i386] Add data32 prefixes to all lgdt/lidt instructions (diff) | |
| download | ipxe-ed196a3ed26cc9aaa034a6451ee1c789c93dfb68.tar.gz ipxe-ed196a3ed26cc9aaa034a6451ee1c789c93dfb68.tar.xz ipxe-ed196a3ed26cc9aaa034a6451ee1c789c93dfb68.zip | |
[settings] Ensure fetch_string_setting() returns a NUL-terminated string
This fixes a regression introduced in commit 612f4e7:
[settings] Avoid returning uninitialised data on error in fetch_xxx_setting()
in which the memset() was moved from fetch_string_setting() to
fetch_setting(), in order that it would be useful for non-string
setting types. However, this neglects to take into account the fact
that fetch_string_setting() shrinks its buffer by one byte (to allow
for the NUL) before calling fetch_setting().
Restore the memset() in fetch_string_setting(), so that the
terminating NUL is guaranteed to actually be a NUL.
Diffstat (limited to 'src/drivers')
0 files changed, 0 insertions, 0 deletions
