OSDN Git Service
(root)
/
android-x86
/
external-efibootmgr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7522c96
)
Make IPv4() device paths print correctly.
author
Peter Jones
<pjones@redhat.com>
Tue, 16 Dec 2014 14:59:53 +0000
(09:59 -0500)
committer
Peter Jones
<pjones@redhat.com>
Tue, 16 Dec 2014 14:59:53 +0000
(09:59 -0500)
We need to give the size to snprintf, not the offset. The offset is
zero, so it'll only ever tell us the buffer size we need, even if we
have a reasonable buffer.
Signed-off-by: Peter Jones <pjones@redhat.com>
src/lib/unparse_path.c
patch
|
blob
|
history
diff --git
a/src/lib/unparse_path.c
b/src/lib/unparse_path.c
index
d76191d
..
4af4d3d
100644
(file)
--- a/
src/lib/unparse_path.c
+++ b/
src/lib/unparse_path.c
@@
-249,7
+249,7
@@
unparse_messaging_path(char *buffer, size_t buffer_size, EFI_DEVICE_PATH *path)
return buf_offset;
case 12:
- needed = snprintf(buffer, buf
_offset
, "IPv4(");
+ needed = snprintf(buffer, buf
fer_size
, "IPv4(");
if (needed < 0)
return -1;
buf_offset += needed;