From 61aa4743602e6fa31de7c963d334bd8dbb544270 Mon Sep 17 00:00:00 2001 From: Shane Alcock Date: Wed, 15 May 2024 10:10:33 +1200 Subject: [PATCH 1/3] ETSI decoding: ULI does not include length or instance userLocationInformation (and any other fields that are derived from 3GPP information elements) should not include the type, length or instance octets when encoded into ETSI records. Note that OpenLI 1.1.4 and 1.1.5 do include length and instance in its encodings (incorrectly), so this change will cause tracepktdump (in libtrace) to mangle the ULI field in any records received from those OpenLI versions. --- src/libwandder_etsili.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libwandder_etsili.c b/src/libwandder_etsili.c index 7c4fb1d..bedff9f 100644 --- a/src/libwandder_etsili.c +++ b/src/libwandder_etsili.c @@ -1638,14 +1638,14 @@ static char *stringify_uli(wandder_etsispec_t *etsidec, int write_rem = len - 1; int res; - memset(valstr, 0, len); - if (len < 4) { + if (len == 0 || valstr == NULL) { return NULL; } - flags = item->valptr[3]; + memset(valstr, 0, len); + flags = item->valptr[0]; - ptr = ptr + 4; - used = 4; + ptr = ptr + 1; + used = 1; while (f < 256) { res = -1; From 4cd123c9a6f941a38cee48d5de92d486dbb68e9c Mon Sep 17 00:00:00 2001 From: Shane Alcock Date: Wed, 15 May 2024 10:38:34 +1200 Subject: [PATCH 2/3] Bump version to 2.0.12 --- ChangeLog | 5 +++++ README | 2 +- configure.ac | 2 +- debian/changelog | 6 ++++++ rpm/libwandder2.spec | 5 ++++- src/Makefile.am | 2 +- 6 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1cd1a35..9b1071e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ +Version 2.0.12 +=============== + * ETSILI: fix incorrect decoding of userLocationInformation + Version 2.0.11 +=============== * Add support for decoding sequences of UTF8Strings * ETSILI: fix broken decoding hierarchy for Email Address Lists diff --git a/README b/README index 0b4c633..b577109 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ libwandder -- C library for DER encoding and decoding. -Current Stable Version: 2.0.11 +Current Stable Version: 2.0.12 --------------------------------------------------------------------------- Copyright (c) 2017-2024 The University of Waikato, Hamilton, New Zealand. diff --git a/configure.ac b/configure.ac index b656c74..0dc3572 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ # Super primitive configure script -AC_INIT(libwandder, 2.0.11, shane@alcock.co.nz) +AC_INIT(libwandder, 2.0.12, shane@alcock.co.nz) AM_INIT_AUTOMAKE([subdir-objects]) AC_CONFIG_SRCDIR(src/decoder.c) diff --git a/debian/changelog b/debian/changelog index db59149..a35dbb2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libwandder2 (2.0.12-1) unstable; urgency=medium + + * ETSILI: fix incorrect decoding of userLocationInformation elements + + -- Shane Alcock Wed, 15 May 2024 10:18:24 +1200 + libwandder2 (2.0.11-1) unstable; urgency=medium * Add support for decoding sequences of UTF8Strings diff --git a/rpm/libwandder2.spec b/rpm/libwandder2.spec index 99fc8b1..25f9459 100644 --- a/rpm/libwandder2.spec +++ b/rpm/libwandder2.spec @@ -1,5 +1,5 @@ Name: libwandder2 -Version: 2.0.11 +Version: 2.0.12 Release: 1%{?dist} Summary: C Library for encoding and decoding data using DER @@ -59,6 +59,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %{_libdir}/*.so %changelog +* Wed May 15 2024 Shane Alcock - 2.0.12-1 +- Updated to 2.0.12 release of libwandder + * Wed Mar 20 2024 Shane Alcock - 2.0.11-1 - Updated to 2.0.11 release of libwandder diff --git a/src/Makefile.am b/src/Makefile.am index f1dcf66..dcdc4ec 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,6 +5,6 @@ libwandder_la_SOURCES=encoder.c decoder.c libwandder.h libwandder_etsili.c \ libwandder_etsili.h itemhandler.c itemhandler.h wandder_internal.h libwandder_la_LIBADD = @ADD_LIBS@ -libwandder_la_LDFLAGS = @ADD_LDFLAGS@ -version-info 4:4:2 +libwandder_la_LDFLAGS = @ADD_LDFLAGS@ -version-info 4:5:2 libwandder_la_CPPFLAGS = -Werror -Wall From 9a359415ab3f1f6c0272fc83494ed93c152e5b70 Mon Sep 17 00:00:00 2001 From: Shane Alcock Date: Wed, 15 May 2024 10:39:43 +1200 Subject: [PATCH 3/3] Update to use my cloudsmith upload action --- .github/workflows/deb-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deb-build.yaml b/.github/workflows/deb-build.yaml index f62660b..8d8365c 100644 --- a/.github/workflows/deb-build.yaml +++ b/.github/workflows/deb-build.yaml @@ -112,7 +112,7 @@ jobs: mkdir -p packages/${DIRNAME} find . -name "*.deb" | xargs cp -t packages/${DIRNAME}/ - name: Publish package to cloudsmith - uses: wanduow/action-cloudsmith-upload-packages@v1 + uses: salcock/action-cloudsmith-upload-packages@v1.8 with: path: packages/ repo: ${{ secrets.CLOUDSMITH_OWNER }}/libwandder