[Git][debian-gis-team/qmapshack][master] Add upstream patch to fix segfault due to bad codec number. (closes: #962622)

Bas Couwenberg gitlab at salsa.debian.org
Thu Jun 11 20:22:37 BST 2020



Bas Couwenberg pushed to branch master at Debian GIS Project / qmapshack


Commits:
8877a2a4 by Bas Couwenberg at 2020-06-11T21:22:29+02:00
Add upstream patch to fix segfault due to bad codec number. (closes: #962622)

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/0001-QMS-204-Garmin-Map-Fix-crash-because-of-bad-codec-nu.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+qmapshack (1.14.1-2) UNRELEASED; urgency=medium
+
+  * Add upstream patch to fix segfault due to bad codec number.
+    (closes: #962622)
+
+ -- Bas Couwenberg <sebastic at debian.org>  Thu, 11 Jun 2020 21:21:37 +0200
+
 qmapshack (1.14.1-1) unstable; urgency=medium
 
   * New upstream release.


=====================================
debian/patches/0001-QMS-204-Garmin-Map-Fix-crash-because-of-bad-codec-nu.patch
=====================================
@@ -0,0 +1,47 @@
+Description: Garmin Map: Fix crash because of bad codec number
+ If the typ file has a bad codec number for UTF8 the code will be
+ a nullptr. As a consequence the pointer ahs to be tested befor
+ it is used.
+Author: kiozen <oliver.eichler at gmx.de>
+Origin: https://github.com/Maproom/qmapshack/commit/4d275a2e30135465188ac541c2e7b496f8c6e2d5
+Bug: https://github.com/Maproom/qmapshack/issues/204
+Bug-Debian: https://bugs.debian.org/962622
+
+--- a/src/qmapshack/map/garmin/CGarminTyp.cpp
++++ b/src/qmapshack/map/garmin/CGarminTyp.cpp
+@@ -504,7 +504,10 @@ bool CGarminTyp::parsePolygon(QDataStrea
+ 
+                     str += t8;
+                 }
+-                property.strings[langcode] = codec->toUnicode(str);
++                if(codec != nullptr)
++                {
++                    property.strings[langcode] = codec->toUnicode(str);
++                }
+ #ifdef DBG
+                 qDebug() << len << langcode << property.strings[langcode];
+ #endif
+@@ -894,7 +897,10 @@ bool CGarminTyp::parsePolyline(QDataStre
+ 
+                     str += t8_1;
+                 }
+-                property.strings[langcode] = codec->toUnicode(str);
++                if(codec != nullptr)
++                {
++                    property.strings[langcode] = codec->toUnicode(str);
++                }
+ #ifdef DBG
+                 qDebug() << len << langcode << property.strings[langcode];
+ #endif
+@@ -1298,7 +1304,10 @@ bool CGarminTyp::parsePoint(QDataStream&
+ 
+                     str += t8_1;
+                 }
+-                property.strings[langcode] = codec->toUnicode(str);
++                if(codec != nullptr)
++                {
++                    property.strings[langcode] = codec->toUnicode(str);
++                }
+ #ifdef DBG
+                 qDebug() << len << langcode << property.strings[langcode];
+ #endif


=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
 FindPROJ4.patch
 FindQuaZip5.patch
 spelling-errors.patch
+0001-QMS-204-Garmin-Map-Fix-crash-because-of-bad-codec-nu.patch



View it on GitLab: https://salsa.debian.org/debian-gis-team/qmapshack/-/commit/8877a2a42e15aad1d0b5b12081d2e214d6761ad6

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/qmapshack/-/commit/8877a2a42e15aad1d0b5b12081d2e214d6761ad6
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20200611/b5a59a7b/attachment-0001.html>


More information about the Pkg-grass-devel mailing list