update to calc-2.12.5.6
This commit is contained in:
parent
3ef0e1dae0
commit
bc89b4caba
@ -1,9 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.28 2017/05/21 21:05:22 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.29 2017/05/25 00:13:47 sthen Exp $
|
||||
|
||||
COMMENT= C-style arbitrary precision calculator
|
||||
|
||||
DISTNAME= calc-2.12.5.5
|
||||
REVISION= 0
|
||||
DISTNAME= calc-2.12.5.6
|
||||
EXTRACT_SUFX= .tar.bz2
|
||||
|
||||
SHARED_LIBS= calc 0.0 \
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (calc-2.12.5.5.tar.bz2) = ef4TNMl6GiM1DNTFQCT7EptAX3BKPx+dqHU+Y6s9tGU=
|
||||
SIZE (calc-2.12.5.5.tar.bz2) = 959874
|
||||
SHA256 (calc-2.12.5.6.tar.bz2) = dgkCA6ltNd0QEDESp61hL02bBSa3WPL0msW+8Cunyzk=
|
||||
SIZE (calc-2.12.5.6.tar.bz2) = 959691
|
||||
|
@ -1,32 +0,0 @@
|
||||
$OpenBSD: patch-version_c,v 1.1 2017/05/21 21:05:22 sthen Exp $
|
||||
|
||||
This changed in 2.12.5.5 and introduced an intermittent segfault.
|
||||
Just use asprintf instead for simplicity.
|
||||
|
||||
Index: version.c
|
||||
--- version.c.orig
|
||||
+++ version.c
|
||||
@@ -121,21 +121,11 @@ version(void)
|
||||
/*
|
||||
* form the version buffer
|
||||
*/
|
||||
- snprintf(verbuf, BUFSIZ,
|
||||
- "%d.%d.%d.%d", calc_major_ver, calc_minor_ver,
|
||||
- calc_major_patch, calc_minor_patch);
|
||||
-
|
||||
- /*
|
||||
- * save the versions string into a newly malloced buffer
|
||||
- */
|
||||
- len = strlen(verbuf);
|
||||
- stored_version = (char *)malloc(len+1);
|
||||
- if (stored_version == NULL) {
|
||||
+ if (asprintf(&stored_version, "%d.%d.%d.%d", calc_major_ver,
|
||||
+ calc_minor_ver, calc_major_patch, calc_minor_patch) == -1) {
|
||||
fprintf(stderr, "%s: cannot malloc version string\n", program);
|
||||
exit(70);
|
||||
}
|
||||
- strncpy(stored_version, verbuf, BUFSIZ);
|
||||
- stored_version[len] = '\0'; /* paranoia */
|
||||
|
||||
/*
|
||||
* return the newly malloced buffer
|
Loading…
Reference in New Issue
Block a user