Hello community,

here is the log from the commit of package libsmpp34 for openSUSE:Factory 
checked in at 2017-10-11 23:03:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libsmpp34 (Old)
 and      /work/SRC/openSUSE:Factory/.libsmpp34.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libsmpp34"

Wed Oct 11 23:03:17 2017 rev:2 rq:533176 version:1.12.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/libsmpp34/libsmpp34.changes      2017-05-05 
09:59:42.738043651 +0200
+++ /work/SRC/openSUSE:Factory/.libsmpp34.new/libsmpp34.changes 2017-10-11 
23:03:19.447721685 +0200
@@ -1,0 +2,7 @@
+Mon Oct  2 23:25:01 UTC 2017 - jeng...@inai.de
+
+- Update to new upstream snapshot 1.12.8
+  * Fix Out of bounds compilation warning in OCTET8
+  * smpp34_structs.h: Fix truncated output in str_tlv_id
+
+-------------------------------------------------------------------

Old:
----
  libsmpp34-1.10.27.tar.xz

New:
----
  libsmpp34-1.12.8.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libsmpp34.spec ++++++
--- /var/tmp/diff_new_pack.2ABQp1/_old  2017-10-11 23:03:20.255686286 +0200
+++ /var/tmp/diff_new_pack.2ABQp1/_new  2017-10-11 23:03:20.259686111 +0200
@@ -18,7 +18,7 @@
 
 
 Name:           libsmpp34
-Version:        1.10.27
+Version:        1.12.8
 Release:        0
 Summary:        PDU SMPP packaging and unpackaging tool
 License:        GPL-2.0+ and LGPL-2.1+
@@ -62,6 +62,7 @@
 
 %prep
 %setup -q
+rm -Rf .pc
 %patch -P 1 -p1
 
 %build

++++++ _service ++++++
--- /var/tmp/diff_new_pack.2ABQp1/_old  2017-10-11 23:03:20.315683657 +0200
+++ /var/tmp/diff_new_pack.2ABQp1/_new  2017-10-11 23:03:20.315683657 +0200
@@ -3,7 +3,7 @@
                <param name="scm">git</param>
                <param name="url">git://git.osmocom.org/libsmpp34</param>
                <param name="revision">master</param>
-               <param name="parent-tag">1.10</param>
+               <param name="parent-tag">1.12</param>
                <param name="versionformat">@PARENT_TAG@.@TAG_OFFSET@</param>
        </service>
        <service name="recompress" mode="disabled">

++++++ libsmpp34-1.10.27.tar.xz -> libsmpp34-1.12.8.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/.pc/.quilt_patches 
new/libsmpp34-1.12.8/.pc/.quilt_patches
--- old/libsmpp34-1.10.27/.pc/.quilt_patches    1970-01-01 01:00:00.000000000 
+0100
+++ new/libsmpp34-1.12.8/.pc/.quilt_patches     2017-09-17 17:05:54.000000000 
+0200
@@ -0,0 +1 @@
+quilt-patches
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/.pc/.quilt_series 
new/libsmpp34-1.12.8/.pc/.quilt_series
--- old/libsmpp34-1.10.27/.pc/.quilt_series     1970-01-01 01:00:00.000000000 
+0100
+++ new/libsmpp34-1.12.8/.pc/.quilt_series      2017-09-17 17:05:54.000000000 
+0200
@@ -0,0 +1 @@
+series
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/.pc/.version 
new/libsmpp34-1.12.8/.pc/.version
--- old/libsmpp34-1.10.27/.pc/.version  1970-01-01 01:00:00.000000000 +0100
+++ new/libsmpp34-1.12.8/.pc/.version   2017-09-17 17:05:54.000000000 +0200
@@ -0,0 +1 @@
+2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/.pc/applied-patches 
new/libsmpp34-1.12.8/.pc/applied-patches
--- old/libsmpp34-1.10.27/.pc/applied-patches   1970-01-01 01:00:00.000000000 
+0100
+++ new/libsmpp34-1.12.8/.pc/applied-patches    2017-09-17 17:05:54.000000000 
+0200
@@ -0,0 +1 @@
+oob.diff
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/.pc/oob.diff/src/smpp34_unpack.c 
new/libsmpp34-1.12.8/.pc/oob.diff/src/smpp34_unpack.c
--- old/libsmpp34-1.10.27/.pc/oob.diff/src/smpp34_unpack.c      1970-01-01 
01:00:00.000000000 +0100
+++ new/libsmpp34-1.12.8/.pc/oob.diff/src/smpp34_unpack.c       2017-09-17 
17:05:54.000000000 +0200
@@ -0,0 +1,253 @@
+/*
+ * Copyright (C) 2006 Raul Tremsal
+ * File  : smpp34_unpack.c
+ * Author: Raul Tremsal <ultrai...@yahoo.com>
+ *
+ * This file is part of libsmpp34 (c-open-smpp3.4 library).
+ *
+ * The libsmpp34 library is free software; you can redistribute it and/or 
+ * modify it under the terms of the GNU Lesser General Public License as 
+ * published by the Free Software Foundation; either version 2.1 of the 
+ * License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but 
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License 
+ * along with this library; if not, write to the Free Software Foundation, 
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
+ *
+ */
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+
+#include <stdint.h>
+
+#include "smpp34.h"
+#include "smpp34_structs.h"
+#include "smpp34_params.h"
+
+/* GLOBALS 
********************************************************************/
+/* EXTERN 
*********************************************************************/
+extern int smpp34_errno;
+extern char smpp34_strerror[2048];
+extern char *ptrerror;
+
+/* FUNCTIONS 
******************************************************************/
+int 
+smpp34_unpack(uint32_t type, void* tt, const uint8_t *ptrBuf, int ptrLen)
+{
+
+    char dummy_b[SMALL_BUFF];
+    const uint8_t *ini      = ptrBuf;
+    const uint8_t *aux      = ptrBuf;
+    int lenval = 0;
+    int left = ptrLen;
+    int lefterror = 0;
+
+    memset(smpp34_strerror, 0, sizeof(smpp34_strerror));
+    ptrerror = smpp34_strerror;
+    lefterror = sizeof(smpp34_strerror);
+
+#define instancia t1->
+
+#define U32( inst, par, _str ){\
+    lenval = sizeof( uint32_t );\
+    if( lenval > left ){\
+        PUTLOG("[%s:%08X(%s)]", par, inst par,\
+                                      "Value length exceed buffer length");\
+        return( -1 );\
+    };\
+    memcpy(&inst par, aux, lenval);\
+    left -= lenval; aux += lenval;\
+    inst par = ntohl( inst par );\
+    _str(inst par, dummy_b);\
+    if( strcmp("", dummy_b) == 0 ){\
+        PUTLOG( "[%s:%08X(%s)]", par, inst par, "Invalid value");\
+        return( -1 );\
+    };\
+    PUTLOG("[%s:%08X(%s)]", par, inst par, "OK");\
+};
+
+#define U16( inst, par, _str ){\
+    lenval = sizeof( uint16_t );\
+    if( lenval > left ){\
+        PUTLOG("[%s:%04X(%s)]", par, inst par,\
+                                      "Value length exceed buffer length");\
+        return( -1 );\
+    }\
+    memcpy(&inst par, aux, lenval);\
+    left -= lenval; aux += lenval;\
+    inst par = ntohs( inst par );\
+    _str(inst par, dummy_b);\
+    if( strcmp("", dummy_b) == 0 ){\
+        PUTLOG("[%s:%04X(%s)]", par, inst par, "Invalid value");\
+        return( -1 );\
+    };\
+    PUTLOG("[%s:%04X(%s)]", par, inst par, "OK");\
+};
+
+#define U08( inst, par, _str ){\
+    lenval = sizeof( uint8_t );\
+    if( lenval > left ){\
+        PUTLOG("[%s:%02X(%s)]", par, inst par,\
+                                      "Value length exceed buffer length");\
+        return( -1 );\
+    };\
+    memcpy(&inst par, aux, lenval);\
+    left -= lenval; aux += lenval;\
+    _str(inst par, dummy_b);\
+    if( strcmp("", dummy_b) == 0 ){\
+        PUTLOG( "[%s:%02X(%s)]", par, inst par, "Invalid value");\
+        return( -1 );\
+    };\
+    PUTLOG("[%s:%02X(%s)]", par, inst par, "OK");\
+};
+
+/* NOTA: Importante, Los WARNINGs de los octetos, advierten de una 
+ *       inconsistencia de largo en los octets/c_octets recibidos, segun se 
+ *       decida el grado de restriccion estos pueden ser errores graves.
+ *       La accion a tomar es truncar estos datos a los largos permitidos en 
la 
+ *       especicacion, pero seguir parseando (saltando segun los largos 
+ *       invalidos) los datos recibidos.
+ */
+#define O_C_OCTET( inst, par, sizeval ){\
+    if( !(inst command_status) ){\
+        C_OCTET( inst, par, sizeval );\
+    } else {\
+        PUTLOG("[%s:%s(%s)]", par, inst par, "OK");\
+    };\
+}
+
+
+#define C_OCTET( inst, par, size ){\
+    lenval = strlen( (char*) aux ) + 1;\
+    if( lenval > left ){\
+        PUTLOG("[len(%s):%d(%s)]", par, lenval, \
+                                      "Value length exceed buffer length");\
+        return( -1 );\
+    };\
+    if( lenval > size ){\
+        PUTLOG("[%s:%s(%s)]", par, inst par, "Data length is invalid");\
+        return( -1 );\
+    } else {\
+        /*snprintf(inst par, (lenval>size)?size:lenval, "%s", aux); */ \
+        memcpy(inst par, aux, lenval);\
+        left -= lenval; aux += lenval;\
+        PUTLOG("[%s:%s(%s)]", par, inst par, "OK");\
+    };\
+}
+
+#define OCTET8( inst, par, size ){\
+    lenval = *((inst par) - 1);\
+    if( lenval > left ){\
+        PUTLOG("[leng %s:%d(%s)]", par, lenval,\
+                                      "Value length exceed buffer length");\
+        return( -1 );\
+    };\
+    if( lenval > size ){\
+        PUTLOG("[%s:%s(%s)]", par, "<bin>",\
+                                      "Data length is invalid (truncate)");\
+        return( -1 );\
+    };\
+    memcpy(&inst par, aux, (lenval>size)?size:lenval);\
+    left -= lenval; aux += lenval;\
+    PUTLOG("[%s:%s(%s)]", par, "<bin>", "OK");\
+}
+
+#define OCTET16( inst, par, size ){\
+    uint16_t l_lenval = 0; /* VERIFICAR ESTO */\
+    memcpy(&l_lenval, (inst par - sizeof(uint16_t)), sizeof(uint16_t));\
+    if( l_lenval > left ){\
+        PUTLOG("[leng %s:%d(%s)]", par, l_lenval,\
+                                      "Value length exceed buffer length");\
+        return( -1 );\
+    };\
+    if( l_lenval > size ){\
+        PUTLOG("[%s:%s(%s)]", par, "<bin>", "Data length is invalid");\
+        return( -1 );\
+    };\
+    PUTLOG("[%s:%s(%s)]", par, "<bin>", "OK");\
+    memcpy(&(inst par), aux, (l_lenval>size)?size:l_lenval);\
+    left -= l_lenval; aux += l_lenval;\
+}
+
+#define TLV( inst, tlv3, do_tlv ){\
+    tlv_t *aux_tlv = NULL;\
+    while( (aux - ini) < t1->command_length ){\
+        aux_tlv = (tlv_t *) malloc(sizeof( tlv_t ));\
+        memset(aux_tlv, 0, sizeof(tlv_t));\
+        do_tlv( aux_tlv );\
+        aux_tlv->next = inst tlv3;\
+        inst tlv3 = aux_tlv;\
+    };\
+};
+
+#define UDAD( inst, udad3, do_udad ){\
+    udad_t *aux_udad = NULL;\
+    int c = 0;\
+    while( c < t1->no_unsuccess ){\
+        aux_udad = (udad_t *) malloc(sizeof( udad_t ));\
+        memset(aux_udad, 0, sizeof(udad_t));\
+        do_udad( aux_udad );\
+        aux_udad->next = inst udad3;\
+        inst udad3 = aux_udad;\
+        c++;\
+    };\
+};
+
+#define DAD( inst, dad3, do_dad ){\
+    dad_t *aux_dad = NULL;\
+    int c = 0;\
+    while( c < t1->number_of_dests ){\
+        aux_dad = (dad_t *) malloc(sizeof( dad_t ));\
+        memset(aux_dad, 0, sizeof(dad_t));\
+        do_dad( aux_dad );\
+        aux_dad->next = inst dad3;\
+        inst dad3 = aux_dad;\
+        c++;\
+    };\
+};
+
+#include "def_frame/alert_notification.tlv"
+#include "def_frame/bind_receiver_resp.tlv"
+#include "def_frame/bind_transceiver_resp.tlv"
+#include "def_frame/bind_transmitter_resp.tlv"
+#include "def_frame/data_sm.tlv"
+#include "def_frame/data_sm_resp.tlv"
+#include "def_frame/deliver_sm.tlv"
+#include "def_frame/submit_multi_resp.udad"
+#include "def_frame/submit_multi.dad"
+#include "def_frame/submit_multi.tlv"
+#include "def_frame/submit_sm.tlv"
+#include "def_list/smpp34_protocol.def"
+
+    { /* Hace algunas Verificaciones **************************************/
+        uint32_t len_orig;
+        uint32_t l;
+        memcpy(&len_orig, tt, sizeof(uint32_t));
+        l = ntohl( len_orig );
+        if( len_orig != (aux - ini) ){
+            PUTLOG("[%s:(Error in PDU length 
%d!=%d)]",PDU,len_orig,(uint32_t)(aux-ini));
+            return( -1 );
+        };
+    };
+
+#include "def_frame/clean.frame"
+    return( 0 );
+};
+
+int 
+smpp34_unpack2(void* tt, const uint8_t *ptrBuf, int ptrLen)
+{
+    uint32_t cmdid;
+    uint32_t tempo;
+    memcpy(&tempo, ptrBuf + 4, sizeof(uint32_t)); /* get command_id PDU */
+    cmdid = ntohl( tempo );
+    return( smpp34_unpack(cmdid, tt, ptrBuf, ptrLen) );
+};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/Makefile.am 
new/libsmpp34-1.12.8/Makefile.am
--- old/libsmpp34-1.10.27/Makefile.am   2017-03-17 21:44:28.000000000 +0100
+++ new/libsmpp34-1.12.8/Makefile.am    2017-09-17 17:05:54.000000000 +0200
@@ -4,6 +4,12 @@
 SUBDIRS += test_apps
 endif
 
+BUILT_SOURCES = $(top_srcdir)/.version
+$(top_srcdir)/.version:
+       echo $(VERSION) > $@-t && mv $@-t $@
+dist-hook:
+       echo $(VERSION) > $(distdir)/.tarball-version
+
 EXTRA_DIST = src/Makefile.am\
              test_pdu/Makefile.am\
              test_apps/Makefile.am \
@@ -13,5 +19,7 @@
              test_apps/recv_and_unpack.inc \
              README.md
 
+@RELMAKE@
+
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libsmpp34.pc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/TODO-RELEASE 
new/libsmpp34-1.12.8/TODO-RELEASE
--- old/libsmpp34-1.10.27/TODO-RELEASE  1970-01-01 01:00:00.000000000 +0100
+++ new/libsmpp34-1.12.8/TODO-RELEASE   2017-09-17 17:05:54.000000000 +0200
@@ -0,0 +1,9 @@
+# When cleaning up this file: bump API version in corresponding Makefile.am 
and rename corresponding debian/lib*.install
+# according to 
https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info
+# In short:
+# LIBVERSION=c:r:a
+# If the library source code has changed at all since the last update, then 
increment revision: c:r + 1:a.
+# If any interfaces have been added, removed, or changed since the last 
update: c + 1:0:0.
+# If any interfaces have been added since the last public release: c:r:a + 1.
+# If any interfaces have been removed or changed since the last public 
release: c:r:0.
+#library       what            description / commit summary line
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/configure.ac 
new/libsmpp34-1.12.8/configure.ac
--- old/libsmpp34-1.10.27/configure.ac  2017-03-17 21:44:28.000000000 +0100
+++ new/libsmpp34-1.12.8/configure.ac   2017-09-17 17:05:54.000000000 +0200
@@ -2,11 +2,16 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.57)
-AC_INIT(libsmpp34, 1.10, ultrai...@yahoo.com)
+AC_INIT(libsmpp34, m4_esyscmd([./git-version-gen .tarball-version]), 
ultrai...@yahoo.com)
+
 AC_CONFIG_AUX_DIR(aux_config)
 AM_INIT_AUTOMAKE([foreign])
 AM_CONFIG_HEADER([aux_config/config.h])
 
+dnl include release helper
+RELMAKE='-include osmo-release.mk'
+AC_SUBST([RELMAKE])
+
 # Checks for programs.
 AC_PROG_CC
 AM_PROG_CC_C_O
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/contrib/jenkins.sh 
new/libsmpp34-1.12.8/contrib/jenkins.sh
--- old/libsmpp34-1.10.27/contrib/jenkins.sh    2017-03-17 21:44:28.000000000 
+0100
+++ new/libsmpp34-1.12.8/contrib/jenkins.sh     2017-09-17 17:05:54.000000000 
+0200
@@ -4,6 +4,6 @@
 
 autoreconf --install --force
 ./configure
-$MAKE
+$MAKE CFLAGS="-Werror" CPPFLAGS="-Werror"
 # currently broken $MAKE $PARALLEL_MAKE
 # currently broken $MAKE distcheck
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/debian/changelog 
new/libsmpp34-1.12.8/debian/changelog
--- old/libsmpp34-1.10.27/debian/changelog      2017-03-17 21:44:28.000000000 
+0100
+++ new/libsmpp34-1.12.8/debian/changelog       2017-09-17 17:05:54.000000000 
+0200
@@ -1,8 +1,15 @@
-libsmpp34 (1.11) UNRELEASED; urgency=medium
+libsmpp34 (1.12.0) UNRELEASED; urgency=medium
 
+  [ Holger Hans Peter Freyther ]
   * Move forward towards a new release.
 
- -- Holger Hans Peter Freyther <hol...@moiji-mobile.com>  Tue, 24 May 2016 
23:07:49 +0200
+  [ Harald Welte ]
+  * it's been four years with various cleanups
+  * SMPP_DELIVERY_RECEIPT_* constants
+  * SMPP ESM class parameter definitions
+  * smpp34_tlv_for_each() helper macro
+
+ -- Harald Welte <lafo...@nataraja.de.gnumonks.org>  Mon, 14 Aug 2017 19:08:37 
+0200
 
 libsmpp34 (1.10z1) stable; urgency=low
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/debian/rules 
new/libsmpp34-1.12.8/debian/rules
--- old/libsmpp34-1.10.27/debian/rules  2017-03-17 21:44:28.000000000 +0100
+++ new/libsmpp34-1.12.8/debian/rules   2017-09-17 17:05:54.000000000 +0200
@@ -4,9 +4,16 @@
 #export DH_VERBOSE=1
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
+DEBIAN  := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
+DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1)
+VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
+
 %:
        dh $@ --with autoreconf --fail-missing
 
 override_dh_strip:
        dh_strip --dbg-package=libsmpp34-dbg
 
+override_dh_autoreconf:
+       echo $(VERSION) > .tarball-version
+       dh_autoreconf
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/def_frame/deliver_sm.frame 
new/libsmpp34-1.12.8/def_frame/deliver_sm.frame
--- old/libsmpp34-1.10.27/def_frame/deliver_sm.frame    2017-03-17 
21:44:28.000000000 +0100
+++ new/libsmpp34-1.12.8/def_frame/deliver_sm.frame     2017-09-17 
17:05:54.000000000 +0200
@@ -15,5 +15,5 @@
     U08( instancia, data_coding, valueDec_08 );
     U08( instancia, sm_default_msg_id, valueDec_08 );
     U08( instancia, sm_length, valueDec_08 );
- OCTET8( instancia, short_message, 254 );
+ OCTET8( instancia, short_message, 254, instancia sm_length );
     TLV( instancia, tlv, do_tlv_deliver_sm );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/def_frame/replace_sm.frame 
new/libsmpp34-1.12.8/def_frame/replace_sm.frame
--- old/libsmpp34-1.10.27/def_frame/replace_sm.frame    2017-03-17 
21:44:28.000000000 +0100
+++ new/libsmpp34-1.12.8/def_frame/replace_sm.frame     2017-09-17 
17:05:54.000000000 +0200
@@ -7,4 +7,4 @@
     U08( instancia, registered_delivery, valueDec_08 );
     U08( instancia, sm_default_msg_id, valueDec_08 );
     U08( instancia, sm_length, valueDec_08 );
- OCTET8( instancia, short_message, 254 );
+ OCTET8( instancia, short_message, 254, instancia sm_length );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/def_frame/submit_multi.frame 
new/libsmpp34-1.12.8/def_frame/submit_multi.frame
--- old/libsmpp34-1.10.27/def_frame/submit_multi.frame  2017-03-17 
21:44:28.000000000 +0100
+++ new/libsmpp34-1.12.8/def_frame/submit_multi.frame   2017-09-17 
17:05:54.000000000 +0200
@@ -14,5 +14,5 @@
     U08( instancia, data_coding, valueDec_08 );
     U08( instancia, sm_default_msg_id, valueDec_08 );
     U08( instancia, sm_length, valueDec_08 );
- OCTET8( instancia, short_message, 254 );
+ OCTET8( instancia, short_message, 254, instancia sm_length );
     TLV( instancia, tlv, do_tlv_submit_multi );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/def_frame/submit_sm.frame 
new/libsmpp34-1.12.8/def_frame/submit_sm.frame
--- old/libsmpp34-1.10.27/def_frame/submit_sm.frame     2017-03-17 
21:44:28.000000000 +0100
+++ new/libsmpp34-1.12.8/def_frame/submit_sm.frame      2017-09-17 
17:05:54.000000000 +0200
@@ -15,5 +15,5 @@
     U08( instancia, data_coding, valueDec_08 );
     U08( instancia, sm_default_msg_id, valueDec_08 );
     U08( instancia, sm_length, valueDec_08 );
- OCTET8( instancia, short_message, 254 );
+ OCTET8( instancia, short_message, 254, instancia sm_length );
     TLV( instancia, tlv, do_tlv_submit_sm );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/git-version-gen 
new/libsmpp34-1.12.8/git-version-gen
--- old/libsmpp34-1.10.27/git-version-gen       1970-01-01 01:00:00.000000000 
+0100
+++ new/libsmpp34-1.12.8/git-version-gen        2017-09-17 17:05:54.000000000 
+0200
@@ -0,0 +1,151 @@
+#!/bin/sh
+# Print a version string.
+scriptversion=2010-01-28.01
+
+# Copyright (C) 2007-2010 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
+# It may be run two ways:
+# - from a git repository in which the "git describe" command below
+#   produces useful output (thus requiring at least one signed tag)
+# - from a non-git-repo directory containing a .tarball-version file, which
+#   presumes this script is invoked like "./git-version-gen .tarball-version".
+
+# In order to use intra-version strings in your project, you will need two
+# separate generated version string files:
+#
+# .tarball-version - present only in a distribution tarball, and not in
+#   a checked-out repository.  Created with contents that were learned at
+#   the last time autoconf was run, and used by git-version-gen.  Must not
+#   be present in either $(srcdir) or $(builddir) for git-version-gen to
+#   give accurate answers during normal development with a checked out tree,
+#   but must be present in a tarball when there is no version control system.
+#   Therefore, it cannot be used in any dependencies.  GNUmakefile has
+#   hooks to force a reconfigure at distribution time to get the value
+#   correct, without penalizing normal development with extra reconfigures.
+#
+# .version - present in a checked-out repository and in a distribution
+#   tarball.  Usable in dependencies, particularly for files that don't
+#   want to depend on config.h but do want to track version changes.
+#   Delete this file prior to any autoconf run where you want to rebuild
+#   files to pick up a version string change; and leave it stale to
+#   minimize rebuild time after unrelated changes to configure sources.
+#
+# It is probably wise to add these two files to .gitignore, so that you
+# don't accidentally commit either generated file.
+#
+# Use the following line in your configure.ac, so that $(VERSION) will
+# automatically be up-to-date each time configure is run (and note that
+# since configure.ac no longer includes a version string, Makefile rules
+# should not depend on configure.ac for version updates).
+#
+# AC_INIT([GNU project],
+#         m4_esyscmd([build-aux/git-version-gen .tarball-version]),
+#         [bug-project@example])
+#
+# Then use the following lines in your Makefile.am, so that .version
+# will be present for dependencies, and so that .tarball-version will
+# exist in distribution tarballs.
+#
+# BUILT_SOURCES = $(top_srcdir)/.version
+# $(top_srcdir)/.version:
+#      echo $(VERSION) > $@-t && mv $@-t $@
+# dist-hook:
+#      echo $(VERSION) > $(distdir)/.tarball-version
+
+case $# in
+    1) ;;
+    *) echo 1>&2 "Usage: $0 \$srcdir/.tarball-version"; exit 1;;
+esac
+
+tarball_version_file=$1
+nl='
+'
+
+# First see if there is a tarball-only version file.
+# then try "git describe", then default.
+if test -f $tarball_version_file
+then
+    v=`cat $tarball_version_file` || exit 1
+    case $v in
+       *$nl*) v= ;; # reject multi-line output
+       [0-9]*) ;;
+       *) v= ;;
+    esac
+    test -z "$v" \
+       && echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2
+fi
+
+if test -n "$v"
+then
+    : # use $v
+elif
+       v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
+         || git describe --abbrev=4 HEAD 2>/dev/null` \
+    && case $v in
+        [0-9]*) ;;
+        v[0-9]*) ;;
+        *) (exit 1) ;;
+       esac
+then
+    # Is this a new git that lists number of commits since the last
+    # tag or the previous older version that did not?
+    #   Newer: v6.10-77-g0f8faeb
+    #   Older: v6.10-g0f8faeb
+    case $v in
+       *-*-*) : git describe is okay three part flavor ;;
+       *-*)
+           : git describe is older two part flavor
+           # Recreate the number of commits and rewrite such that the
+           # result is the same as if we were using the newer version
+           # of git describe.
+           vtag=`echo "$v" | sed 's/-.*//'`
+           numcommits=`git rev-list "$vtag"..HEAD | wc -l`
+           v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`;
+           ;;
+    esac
+
+    # Change the first '-' to a '.', so version-comparing tools work properly.
+    # Remove the "g" in git describe's output string, to save a byte.
+    v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
+else
+    v=UNKNOWN
+fi
+
+v=`echo "$v" |sed 's/^v//'`
+
+# Don't declare a version "dirty" merely because a time stamp has changed.
+git status > /dev/null 2>&1
+
+dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
+case "$dirty" in
+    '') ;;
+    *) # Append the suffix only if there isn't one already.
+       case $v in
+         *-dirty) ;;
+         *) v="$v-dirty" ;;
+       esac ;;
+esac
+
+# Omit the trailing newline, so that m4_esyscmd can use the result directly.
+echo "$v" | tr -d '\012'
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/quilt-patches/oob.diff 
new/libsmpp34-1.12.8/quilt-patches/oob.diff
--- old/libsmpp34-1.10.27/quilt-patches/oob.diff        1970-01-01 
01:00:00.000000000 +0100
+++ new/libsmpp34-1.12.8/quilt-patches/oob.diff 2017-09-17 17:05:54.000000000 
+0200
@@ -0,0 +1,33 @@
+
+attempt at addressing the out of bounds access.
+lenval = *((t1->short_message) - 1) aka
+lenval = t1->short_message[-1]
+does not make much sense to me. What seems more logical is that
+the len byte pointed to by t1->short_message includes the size
+for a header, similar to how netlink attrs work.
+Maybe.
+
+[   13s] ../src/smpp34_unpack.c:147:14: warning: array subscript is above 
array bounds [-Warray-bounds]
+[   13s]      lenval = *((inst par) - 1);\
+[   13s]               ^~~~~~~~~~~~~~~~~
+[   13s] ../def_frame/submit_sm.frame:18:2: note: in expansion of macro 
'OCTET8'
+[   13s]   OCTET8( instancia, short_message, 254 );
+[   13s]   ^~~~~~
+
+---
+ src/smpp34_unpack.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: libsmpp34-1.10.27/src/smpp34_unpack.c
+===================================================================
+--- libsmpp34-1.10.27.orig/src/smpp34_unpack.c
++++ libsmpp34-1.10.27/src/smpp34_unpack.c
+@@ -144,7 +144,7 @@ smpp34_unpack(uint32_t type, void* tt, c
+ }
+ 
+ #define OCTET8( inst, par, size ){\
+-    lenval = *((inst par) - 1);\
++    lenval = *(inst par) - 1;\
+     if( lenval > left ){\
+         PUTLOG("[leng %s:%d(%s)]", par, lenval,\
+                                       "Value length exceed buffer length");\
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/quilt-patches/series 
new/libsmpp34-1.12.8/quilt-patches/series
--- old/libsmpp34-1.10.27/quilt-patches/series  1970-01-01 01:00:00.000000000 
+0100
+++ new/libsmpp34-1.12.8/quilt-patches/series   2017-09-17 17:05:54.000000000 
+0200
@@ -0,0 +1 @@
+oob.diff
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/src/smpp34.h 
new/libsmpp34-1.12.8/src/smpp34.h
--- old/libsmpp34-1.10.27/src/smpp34.h  2017-03-17 21:44:28.000000000 +0100
+++ new/libsmpp34-1.12.8/src/smpp34.h   2017-09-17 17:05:54.000000000 +0200
@@ -204,4 +204,16 @@
 #define TLVID_its_reply_type              0x1380 /* CDMA */
 #define TLVID_its_session_info            0x1383 /* CDMA */
 
+/* As defined by SMPP 3.4, Sect. 5.2.12 Parameter Definition esm_class. */
+#define SMPP34_DATAGRAM_MODE           0x01
+#define SMPP34_MSG_MODE_MASK           0x03
+#define SMPP34_DELIVERY_RECEIPT                0x04
+#define SMPP34_DELIVERY_ACK            0x08
+#define SMPP34_UDHI_IND                        0x40
+#define SMPP34_REPLY_PATH              0x80
+
+/* Sect. 5.2.17 registered_delivery. */
+#define SMPP34_DELIVERY_RECEIPT_OFF    0x00
+#define SMPP34_DELIVERY_RECEIPT_ON     0x01
+
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/src/smpp34_dumpBuf.c 
new/libsmpp34-1.12.8/src/smpp34_dumpBuf.c
--- old/libsmpp34-1.10.27/src/smpp34_dumpBuf.c  2017-03-17 21:44:28.000000000 
+0100
+++ new/libsmpp34-1.12.8/src/smpp34_dumpBuf.c   2017-09-17 17:05:54.000000000 
+0200
@@ -49,14 +49,12 @@
     int size;
     uint8_t ind = 3;
     uint8_t *buffer = NULL;
-    int lefterror = 0;
 
     size   = srcL;
     buffer = src;
 
     memset(smpp34_strerror, 0, sizeof(smpp34_strerror));
     ptrerror = smpp34_strerror;
-    lefterror = sizeof(smpp34_strerror);
 
     /* dump buffer character by character until size is reached */
     for(i = 0; i < size; i++){
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/src/smpp34_dumpPdu.c 
new/libsmpp34-1.12.8/src/smpp34_dumpPdu.c
--- old/libsmpp34-1.10.27/src/smpp34_dumpPdu.c  2017-03-17 21:44:28.000000000 
+0100
+++ new/libsmpp34-1.12.8/src/smpp34_dumpPdu.c   2017-09-17 17:05:54.000000000 
+0200
@@ -136,11 +136,10 @@
     _op(inst, par, size )\
 }
 
-#define OCTET8( inst, par, size ){\
+#define OCTET8( inst, par, size, lenval ){\
     int i = 0;\
     uint8_t *p = l_dest;\
     int dummy = 0;\
-    lenval = *((inst par) - 1);\
     if( (lenval + 33) >= left ){\
         PUTLOG("[%s:%s(%s)]", par, inst par, \
                                      "Value length exceed buffer length");\
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/src/smpp34_pack.c 
new/libsmpp34-1.12.8/src/smpp34_pack.c
--- old/libsmpp34-1.10.27/src/smpp34_pack.c     2017-03-17 21:44:28.000000000 
+0100
+++ new/libsmpp34-1.12.8/src/smpp34_pack.c      2017-09-17 17:05:54.000000000 
+0200
@@ -139,8 +139,7 @@
     }\
 };
 
-#define OCTET8( inst, par, sizeval ){\
-    lenval = *((inst par) - 1);\
+#define OCTET8( inst, par, sizeval, lenval ){\
     if( lenval >= left ){\
         PUTLOG("[leng %s:%d(%s)]", par, lenval,\
                                       "Value length exceed buffer length");\
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/src/smpp34_structs.h 
new/libsmpp34-1.12.8/src/smpp34_structs.h
--- old/libsmpp34-1.10.27/src/smpp34_structs.h  2017-03-17 21:44:28.000000000 
+0100
+++ new/libsmpp34-1.12.8/src/smpp34_structs.h   2017-09-17 17:05:54.000000000 
+0200
@@ -5,25 +5,25 @@
  *
  * This file is part of libsmpp34 (c-open-smpp3.4 library).
  *
- * The libsmpp34 library is free software; you can redistribute it and/or 
- * modify it under the terms of the GNU Lesser General Public License as 
- * published by the Free Software Foundation; either version 2.1 of the 
+ * The libsmpp34 library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of the
  * License, or (at your option) any later version.
  *
- * This library is distributed in the hope that it will be useful, but 
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
  * License for more details.
  *
- * You should have received a copy of the GNU Lesser General Public License 
- * along with this library; if not, write to the Free Software Foundation, 
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  *
  */
 #ifndef _STB_H_
 #define _STB_H_
 
-#define SMALL_BUFF      30
+#define SMALL_BUFF      34
 /* Identify PDUs ident 
********************************************************/
 #define MAX_TLV_SIZE         1024
 #define MAX_DAD_SIZE         21
@@ -37,35 +37,35 @@
 extern char smpp34_strerror[2048];
 
 /* Define structures 
**********************************************************/
-typedef struct tlv_t tlv_t; 
-typedef struct dad_t dad_t; 
-typedef struct udad_t udad_t; 
-typedef struct bind_transmitter_t bind_transmitter_t; 
-typedef struct bind_transmitter_resp_t bind_transmitter_resp_t; 
-typedef struct bind_receiver_t bind_receiver_t; 
-typedef struct bind_receiver_resp_t bind_receiver_resp_t; 
-typedef struct bind_transceiver_t bind_transceiver_t; 
-typedef struct bind_transceiver_resp_t bind_transceiver_resp_t; 
-typedef struct outbind_t outbind_t; 
-typedef struct unbind_t unbind_t; 
-typedef struct unbind_resp_t unbind_resp_t; 
-typedef struct generic_nack_t generic_nack_t; 
-typedef struct submit_sm_t submit_sm_t; 
-typedef struct submit_sm_resp_t submit_sm_resp_t; 
-typedef struct submit_multi_t submit_multi_t; 
-typedef struct submit_multi_resp_t submit_multi_resp_t; 
-typedef struct deliver_sm_t deliver_sm_t; 
-typedef struct deliver_sm_resp_t deliver_sm_resp_t; 
-typedef struct data_sm_t data_sm_t; 
-typedef struct data_sm_resp_t data_sm_resp_t; 
-typedef struct query_sm_t query_sm_t; 
-typedef struct query_sm_resp_t query_sm_resp_t; 
-typedef struct cancel_sm_t cancel_sm_t; 
-typedef struct cancel_sm_resp_t cancel_sm_resp_t; 
-typedef struct replace_sm_t replace_sm_t; 
-typedef struct replace_sm_resp_t replace_sm_resp_t; 
-typedef struct enquire_link_t enquire_link_t; 
-typedef struct alert_notification_t alert_notification_t; 
+typedef struct tlv_t tlv_t;
+typedef struct dad_t dad_t;
+typedef struct udad_t udad_t;
+typedef struct bind_transmitter_t bind_transmitter_t;
+typedef struct bind_transmitter_resp_t bind_transmitter_resp_t;
+typedef struct bind_receiver_t bind_receiver_t;
+typedef struct bind_receiver_resp_t bind_receiver_resp_t;
+typedef struct bind_transceiver_t bind_transceiver_t;
+typedef struct bind_transceiver_resp_t bind_transceiver_resp_t;
+typedef struct outbind_t outbind_t;
+typedef struct unbind_t unbind_t;
+typedef struct unbind_resp_t unbind_resp_t;
+typedef struct generic_nack_t generic_nack_t;
+typedef struct submit_sm_t submit_sm_t;
+typedef struct submit_sm_resp_t submit_sm_resp_t;
+typedef struct submit_multi_t submit_multi_t;
+typedef struct submit_multi_resp_t submit_multi_resp_t;
+typedef struct deliver_sm_t deliver_sm_t;
+typedef struct deliver_sm_resp_t deliver_sm_resp_t;
+typedef struct data_sm_t data_sm_t;
+typedef struct data_sm_resp_t data_sm_resp_t;
+typedef struct query_sm_t query_sm_t;
+typedef struct query_sm_resp_t query_sm_resp_t;
+typedef struct cancel_sm_t cancel_sm_t;
+typedef struct cancel_sm_resp_t cancel_sm_resp_t;
+typedef struct replace_sm_t replace_sm_t;
+typedef struct replace_sm_resp_t replace_sm_resp_t;
+typedef struct enquire_link_t enquire_link_t;
+typedef struct alert_notification_t alert_notification_t;
 
 /* TYPEDEFs structs 
***********************************************************/
 #define instancia 0
@@ -75,7 +75,7 @@
 
 #define O_C_OCTET( inst, par, size ) uint8_t par[ size ];
 #define C_OCTET( inst, par, size ) uint8_t par[ size ];
-#define OCTET8( inst, par, size ) uint8_t par[ size ];
+#define OCTET8( inst, par, size, lenval ) uint8_t par[ size ];
 #define OCTET16( inst, par, size ) uint8_t par[ size ];
 
 #define TLV( inst, par, do_tlv ) tlv_t *par;
@@ -86,6 +86,9 @@
     OCTET16( inst, octet, size        ); \
 } par;
 
+#define smpp34_tlv_for_each(pos, head) \
+       for (pos = (head); pos != NULL; pos = pos->next)
+
 #define DAD( inst, par, do_dest_address ) dad_t *par;
 #define UU2( inst, par, size ) union { \
     struct { \
@@ -229,7 +232,7 @@
     #include "def_frame/header.frame"
 };
 
-typedef struct enquire_link_resp_t enquire_link_resp_t; 
+typedef struct enquire_link_resp_t enquire_link_resp_t;
 struct enquire_link_resp_t {
     #include "def_frame/header.frame"
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/src/smpp34_unpack.c 
new/libsmpp34-1.12.8/src/smpp34_unpack.c
--- old/libsmpp34-1.10.27/src/smpp34_unpack.c   2017-03-17 21:44:28.000000000 
+0100
+++ new/libsmpp34-1.12.8/src/smpp34_unpack.c    2017-09-17 17:05:54.000000000 
+0200
@@ -143,8 +143,7 @@
     };\
 }
 
-#define OCTET8( inst, par, size ){\
-    lenval = *((inst par) - 1);\
+#define OCTET8( inst, par, size, lenval ){\
     if( lenval > left ){\
         PUTLOG("[leng %s:%d(%s)]", par, lenval,\
                                       "Value length exceed buffer length");\
@@ -229,9 +228,7 @@
 
     { /* Hace algunas Verificaciones **************************************/
         uint32_t len_orig;
-        uint32_t l;
         memcpy(&len_orig, tt, sizeof(uint32_t));
-        l = ntohl( len_orig );
         if( len_orig != (aux - ini) ){
             PUTLOG("[%s:(Error in PDU length 
%d!=%d)]",PDU,len_orig,(uint32_t)(aux-ini));
             return( -1 );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libsmpp34-1.10.27/test_pdu/bind_receiver_resp_test.c 
new/libsmpp34-1.12.8/test_pdu/bind_receiver_resp_test.c
--- old/libsmpp34-1.10.27/test_pdu/bind_receiver_resp_test.c    2017-03-17 
21:44:28.000000000 +0100
+++ new/libsmpp34-1.12.8/test_pdu/bind_receiver_resp_test.c     2017-09-17 
17:05:54.000000000 +0200
@@ -52,7 +52,7 @@
     b.command_id       = BIND_RECEIVER_RESP;
     b.command_status   = ESME_ROK;
     b.sequence_number  = 1;
-    snprintf((char*)b.system_id, sizeof(b.system_id), "%s", 
"1234567890123456");
+    snprintf((char*)b.system_id, sizeof(b.system_id), "%s", "123456789012345");
 
     tlv.tag = TLVID_sc_interface_version;
     tlv.length = sizeof(uint8_t);


Reply via email to