Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/emulators/gpsim-devel Don't modify const strings. Hono...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d78f0058422e
branches:  trunk
changeset: 429408:d78f0058422e
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Mon Apr 20 00:36:45 2020 +0000

description:
Don't modify const strings. Honor length arguments. Bump revision.

diffstat:

 emulators/gpsim-devel/Makefile                   |   4 ++--
 emulators/gpsim-devel/distinfo                   |   6 +++---
 emulators/gpsim-devel/patches/patch-cli-scan.ll  |  17 +++++++++++++++--
 emulators/gpsim-devel/patches/patch-src_value.cc |  11 ++++++++++-
 4 files changed, 30 insertions(+), 8 deletions(-)

diffs (89 lines):

diff -r df37ce43add1 -r d78f0058422e emulators/gpsim-devel/Makefile
--- a/emulators/gpsim-devel/Makefile    Mon Apr 20 00:35:23 2020 +0000
+++ b/emulators/gpsim-devel/Makefile    Mon Apr 20 00:36:45 2020 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.50 2020/03/20 11:57:36 nia Exp $
+# $NetBSD: Makefile,v 1.51 2020/04/20 00:36:45 joerg Exp $
 #
 
 DISTNAME=      gpsim-20050905
-PKGREVISION=   37
+PKGREVISION=   38
 CATEGORIES=    emulators
 MASTER_SITES=  http://www-asim.lip6.fr/~bouyer/pic/
 
diff -r df37ce43add1 -r d78f0058422e emulators/gpsim-devel/distinfo
--- a/emulators/gpsim-devel/distinfo    Mon Apr 20 00:35:23 2020 +0000
+++ b/emulators/gpsim-devel/distinfo    Mon Apr 20 00:36:45 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2015/11/03 20:30:58 agc Exp $
+$NetBSD: distinfo,v 1.13 2020/04/20 00:36:45 joerg Exp $
 
 SHA1 (gpsim-20050905.tar.gz) = 46e7d0d69695961aca4324d8d3267181bd641081
 RMD160 (gpsim-20050905.tar.gz) = 1b717f0e51440c4e2db72a4bdfb90d2e8d5e4a3d
@@ -10,7 +10,7 @@
 SHA1 (patch-ae) = 31c9ac582edf2e9e543905f0af6aed92da49f73c
 SHA1 (patch-af) = 7cc61d6a1b6476a2a120ae15f25c500693f1897f
 SHA1 (patch-cli-parse.yy) = 15828629b4d151f816699a22fa56abdf50b2fe5c
-SHA1 (patch-cli-scan.ll) = 27e96369b155fe3a627acef734b09b0398fb9c43
+SHA1 (patch-cli-scan.ll) = 85ad52785574b85a062256297586782a5b04bc81
 SHA1 (patch-cli_cmd__clear.cc) = c5cded15623247dfc3028f8af6bf6331ee8f8e63
 SHA1 (patch-cli_cmd__help.cc) = a26b30ca138f630de751acc7a8bc463f48c4739b
 SHA1 (patch-cli_cmd__list.cc) = 9494ef3c3458e22b85bd0555a59e1dab3598cc03
@@ -33,4 +33,4 @@
 SHA1 (patch-src_protocol.h) = ed2c7c903ed605b26a50c125436ac18f11d824eb
 SHA1 (patch-src_symbol.cc) = 195c15f4c258398d4a7c28cee1cf3d3ad7164429
 SHA1 (patch-src_symbol.h) = 778f2b9f8febfa498b87acfb59fdcb665975e592
-SHA1 (patch-src_value.cc) = 3fceae8b4d40ad1c26a06ac7dce6bb88965ae018
+SHA1 (patch-src_value.cc) = ce7b2ce2ffe136bb3b64b3212cef4ad4cbb82def
diff -r df37ce43add1 -r d78f0058422e emulators/gpsim-devel/patches/patch-cli-scan.ll
--- a/emulators/gpsim-devel/patches/patch-cli-scan.ll   Mon Apr 20 00:35:23 2020 +0000
+++ b/emulators/gpsim-devel/patches/patch-cli-scan.ll   Mon Apr 20 00:36:45 2020 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-cli-scan.ll,v 1.1 2011/09/08 00:12:00 joerg Exp $
+$NetBSD: patch-cli-scan.ll,v 1.2 2020/04/20 00:36:45 joerg Exp $
 
---- cli/scan.ll.orig   2011-09-07 13:25:35.000000000 +0000
+--- cli/scan.ll.orig   2005-08-31 14:46:34.000000000 +0000
 +++ cli/scan.ll
 @@ -46,7 +46,7 @@ Boston, MA 02111-1307, USA.  */
  
@@ -11,3 +11,16 @@
  extern int yyparse(void);
  
  /* This is the max length of a line within a macro definition */
+@@ -760,9 +760,9 @@ static int process_stringLiteral(YYSTYPE
+ 
+ static int process_quotedStringLiteral(YYSTYPE* yylvalP, const char *buffer)
+ {
+-  char * pCloseQuote = strchr(buffer, '\"');
+-  *pCloseQuote = 0;
+-  yylvalP->String_P = new String(buffer);
++  const char * pCloseQuote = strchr(buffer, '\"');
++  yylvalP->String_P = new String(0);
++  yylvalP->String_P->set(buffer, pCloseQuote - buffer);
+   return(recognize(LITERAL_STRING_T, "string literal"));
+ }
+ 
diff -r df37ce43add1 -r d78f0058422e emulators/gpsim-devel/patches/patch-src_value.cc
--- a/emulators/gpsim-devel/patches/patch-src_value.cc  Mon Apr 20 00:35:23 2020 +0000
+++ b/emulators/gpsim-devel/patches/patch-src_value.cc  Mon Apr 20 00:36:45 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_value.cc,v 1.1 2011/12/19 15:58:40 wiz Exp $
+$NetBSD: patch-src_value.cc,v 1.2 2020/04/20 00:36:45 joerg Exp $
 
 --- src/value.cc.orig  2005-08-31 14:48:21.000000000 +0000
 +++ src/value.cc
@@ -10,3 +10,12 @@
  
  #include "processor.h"
  
+@@ -1126,7 +1127,7 @@ void String::set(const char *s,int len)
+   if(value)
+     free(value);
+   if(s)
+-    value = strdup(s);
++    value = strndup(s, len);
+   else
+     value = 0;
+ }



Home | Main Index | Thread Index | Old Index