projects
/
platform
/
upstream
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae2dd06
)
dmi: fix more pointer subtraction bugs
author
H. Peter Anvin
<hpa@linux.intel.com>
Wed, 27 Apr 2011 00:36:37 +0000
(17:36 -0700)
committer
H. Peter Anvin
<hpa@linux.intel.com>
Wed, 27 Apr 2011 00:36:37 +0000
(17:36 -0700)
Two more places with bogus pointer subtraction...
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
core/dmi.c
patch
|
blob
|
history
diff --git
a/core/dmi.c
b/core/dmi.c
index
988a4e8
..
e4deb15
100644
(file)
--- a/
core/dmi.c
+++ b/
core/dmi.c
@@
-283,13
+283,13
@@
static const char *dmi_install_string(const char *pfx, const char *str)
}
pfxlen = strlen(pfx);
- q = nstr = malloc(pfxlen + (ep-
p
) + 1);
+ q = nstr = malloc(pfxlen + (ep-
str
) + 1);
if (!nstr)
return NULL;
memcpy(q, pfx, pfxlen);
q += pfxlen;
memcpy(q, str, ep-str);
- q += (ep-
p
);
+ q += (ep-
str
);
*q = '\0';
return nstr;