summaryrefslogtreecommitdiffstats
path: root/text-utils/hexdump-parse.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:34 +0000
commit1272be04be0cb803eec87f602edb2e3e6f111aea (patch)
treebce17f6478cdd9f3c4ec3d751135dc42786d6a56 /text-utils/hexdump-parse.c
parentReleasing progress-linux version 2.39.3-11~progress7.99u1. (diff)
downloadutil-linux-1272be04be0cb803eec87f602edb2e3e6f111aea.tar.xz
util-linux-1272be04be0cb803eec87f602edb2e3e6f111aea.zip
Merging upstream version 2.40.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'text-utils/hexdump-parse.c')
-rw-r--r--text-utils/hexdump-parse.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/text-utils/hexdump-parse.c b/text-utils/hexdump-parse.c
index 272bb24..23fffc8 100644
--- a/text-utils/hexdump-parse.c
+++ b/text-utils/hexdump-parse.c
@@ -427,9 +427,7 @@ isint: cs[3] = '\0';
*/
savech = *p2;
p1[0] = '\0';
- pr->fmt = xmalloc(strlen(fmtp) + strlen(cs) + 1);
- strcpy(pr->fmt, fmtp);
- strcat(pr->fmt, cs);
+ xasprintf(&pr->fmt, "%s%s", fmtp, cs);
*p2 = savech;
pr->cchar = pr->fmt + (p1 - fmtp);
fmtp = p2;