File: fix_ciddr_ftbfs.dpatch

package info (click to toggle)
libcommoncpp2 1.8.1-6.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,272 kB
  • ctags: 4,532
  • sloc: cpp: 29,219; sh: 10,352; ansic: 1,134; makefile: 232; xml: 5
file content (30 lines) | stat: -rw-r--r-- 1,008 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#! /bin/sh /usr/share/dpatch/dpatch-run
## fix_ciddr_ftbfs.dpatch by Stefan Potyra <sistpoty@ubuntu.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: do not overwrite the const argument, but rather make use of the
## DP: buffer in ciddr::set

@DPATCH@
Index: libcommoncpp2-1.8.1/src/cidr.cpp
===================================================================
--- libcommoncpp2-1.8.1.orig/src/cidr.cpp	2010-11-01 10:15:28.000000000 +1100
+++ libcommoncpp2-1.8.1/src/cidr.cpp	2012-05-19 10:52:26.000000000 +1000
@@ -199,7 +199,7 @@
     bitset((bit_t *)&netmask, getMask(cp));
     setString(cbuf, sizeof(cbuf), cp);
 
-    ep = (char *)strchr(cp, '/');
+    ep = (char *)strchr(cbuf, '/');
 
     if(ep)
         *ep = 0;
@@ -328,7 +328,7 @@
     memset(&netmask, 0, sizeof(netmask));
     bitset((bit_t *)&netmask, getMask(cp));
     setString(cbuf, sizeof(cbuf), cp);
-    ep = (char *)strchr(cp, '/');
+    ep = (char *)strchr(cbuf, '/');
     if(ep)
         *ep = 0;