diff options
Diffstat (limited to 'lib/libmp/mpasbn.c')
-rw-r--r-- | lib/libmp/mpasbn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libmp/mpasbn.c b/lib/libmp/mpasbn.c index bc5556d..2656124 100644 --- a/lib/libmp/mpasbn.c +++ b/lib/libmp/mpasbn.c @@ -286,10 +286,10 @@ mp_min(MINT *mp) line = fgetln(stdin, &linelen); if (line == NULL) MPERR(("min")); - nline = malloc(linelen); + nline = malloc(linelen + 1); if (nline == NULL) MPERR(("min")); - strncpy(nline, line, linelen); + memcpy(nline, line, linelen); nline[linelen] = '\0'; rmp = _dtom("min", nline); _movem("min", rmp, mp); |