Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/time PR/51484: gson@: Fix off by one (wrong merge)



details:   https://anonhg.NetBSD.org/src/rev/2ef3f7324e83
branches:  trunk
changeset: 347854:2ef3f7324e83
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Sep 19 18:43:23 2016 +0000

description:
PR/51484: gson@: Fix off by one (wrong merge)

diffstat:

 lib/libc/time/zic.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r d2bf0b86d118 -r 2ef3f7324e83 lib/libc/time/zic.c
--- a/lib/libc/time/zic.c       Mon Sep 19 01:20:26 2016 +0000
+++ b/lib/libc/time/zic.c       Mon Sep 19 18:43:23 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zic.c,v 1.59 2016/09/16 17:12:06 christos Exp $        */
+/*     $NetBSD: zic.c,v 1.60 2016/09/19 18:43:23 christos Exp $        */
 /*
 ** This file is in the public domain, so clarified as of
 ** 2006-07-17 by Arthur David Olson.
@@ -10,7 +10,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: zic.c,v 1.59 2016/09/16 17:12:06 christos Exp $");
+__RCSID("$NetBSD: zic.c,v 1.60 2016/09/19 18:43:23 christos Exp $");
 #endif /* !defined lint */
 
 #include "private.h"
@@ -158,7 +158,7 @@
    QTBUG-53071 <https://bugreports.qt.io/browse/QTBUG-53071>.  This
    workaround will no longer be needed when Qt 5.6.1 and earlier are
    obsolete, say in the year 2021.  */
-enum { WORK_AROUND_QTBUG_53071 = true };
+enum { WORK_AROUND_QTBUG_53071 = 1 };
 
 static int             charcnt;
 static bool            errors;
@@ -1645,7 +1645,7 @@
        zic_t one = 1;
        zic_t y2038_boundary = one << 31;
        int nats = timecnt + WORK_AROUND_QTBUG_53071;
-       zic_t *ats = zic_malloc(size_product(timecnt, sizeof *ats + 1));
+       zic_t *ats = zic_malloc(size_product(nats, sizeof *ats + 1));
        void *typesptr = ats + nats;
        unsigned char *types = typesptr;
 



Home | Main Index | Thread Index | Old Index