aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqorg11 <qorg@vxempire.xyz>2021-07-29 02:22:09 +0200
committerGitHub <noreply@github.com>2021-07-29 02:22:09 +0200
commit997648dda98074911e99ec0b02621ad63f340840 (patch)
tree3275fcfdb199de496a027ed1a88ad22acf5bea42
parenta1a34c458a7f6c59ca31af246aeaebb18f4e1122 (diff)
parent8da92494ee73fea93cb252f88717767b05c4352a (diff)
downloaddemiurge-997648dda98074911e99ec0b02621ad63f340840.tar.gz
demiurge-997648dda98074911e99ec0b02621ad63f340840.zip
Merge pull request #4 from a1batross/patch-1
asprintf: Fix undefined behavior
-rw-r--r--src/asprintf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/asprintf.c b/src/asprintf.c
index ee01c2e..8c0ad4c 100644
--- a/src/asprintf.c
+++ b/src/asprintf.c
@@ -28,8 +28,9 @@ dm_asprintf(char **restrict strp, const char *restrict fmt, ...)
va_list args;
int size = 0;
va_start(args, fmt);
+ size = dm_vasprintf(strp, fmt, args);
va_end(args);
- return size = dm_vasprintf(strp, fmt, args);
+ return size;
}
int