Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/ssp void * is bad for computation, so cast to const...



details:   https://anonhg.NetBSD.org/src/rev/1e2cc0dfe748
branches:  trunk
changeset: 338185:1e2cc0dfe748
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed May 13 19:57:16 2015 +0000

description:
void * is bad for computation, so cast to const char * first.

diffstat:

 lib/libc/ssp/memcpy_chk.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 9b3e621c4fed -r 1e2cc0dfe748 lib/libc/ssp/memcpy_chk.c
--- a/lib/libc/ssp/memcpy_chk.c Wed May 13 15:33:47 2015 +0000
+++ b/lib/libc/ssp/memcpy_chk.c Wed May 13 19:57:16 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: memcpy_chk.c,v 1.6 2015/05/09 15:42:21 christos Exp $  */
+/*     $NetBSD: memcpy_chk.c,v 1.7 2015/05/13 19:57:16 joerg Exp $     */
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: memcpy_chk.c,v 1.6 2015/05/09 15:42:21 christos Exp $");
+__RCSID("$NetBSD: memcpy_chk.c,v 1.7 2015/05/13 19:57:16 joerg Exp $");
 
 /*LINTLIBRARY*/
 
@@ -47,7 +47,7 @@
        if (len > slen)
                __chk_fail();
 
-       if (__ssp_overlap(src, dst, len))
+       if (__ssp_overlap((const char *)src, (const char *)dst, len))
                __chk_fail();
 
        return memcpy(dst, src, len);



Home | Main Index | Thread Index | Old Index