diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2011-04-26 17:36:37 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-04-26 17:36:37 -0700 |
commit | b65011e22077f51ef32db3b7d9791bfe0f7684a4 (patch) | |
tree | f25dc3c3c6658767d72a0258e5f06192d00c3ba7 | |
parent | ae2dd06c076a447ec9ca8f7b02cdf15ef5e6ce15 (diff) | |
download | syslinux-b65011e22077f51ef32db3b7d9791bfe0f7684a4.tar.gz |
dmi: fix more pointer subtraction bugs
Two more places with bogus pointer subtraction...
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r-- | core/dmi.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |