[gazebo] 01/03: strlen patch taken from upstream
Jochen Sprickerhof
jspricke at moszumanska.debian.org
Sun Oct 15 23:14:01 UTC 2017
This is an automated email from the git hooks/post-receive script.
jspricke pushed a commit to branch master
in repository gazebo.
commit 6e4e7dd8ee79c37a18b0eb4d7393d34e293993d2
Author: Jochen Sprickerhof <git at jochen.sprickerhof.de>
Date: Mon Oct 16 00:51:16 2017 +0200
strlen patch taken from upstream
Closes: #876562
---
debian/patches/series | 1 +
debian/patches/strlen.patch | 22 ++++++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/debian/patches/series b/debian/patches/series
index a9ad18e..4ae4b59 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
0002_use_system_gtest.patch
0005-fix-problems-on-manpage.patch
0008-arial-font-removed-in-dfsg.patch
+strlen.patch
diff --git a/debian/patches/strlen.patch b/debian/patches/strlen.patch
new file mode 100644
index 0000000..e7b0859
--- /dev/null
+++ b/debian/patches/strlen.patch
@@ -0,0 +1,22 @@
+# HG changeset patch
+# User Kartik Mohta <kartikmohta at gmail.com>
+# Date 1496126419 14400
+# Branch fix/GuiIface-strlen
+# Node ID 2fac294590a187c851e95b4e3e7e34cdc5c76c6a
+# Parent bae84f76b4ad7a6a7cecaeb3e76e545b8c8d5f3e
+GuiIface.cc: Fix buffer size for snprintf when putting "gazebo" into g_argv
+
+diff --git a/gazebo/gui/GuiIface.cc b/gazebo/gui/GuiIface.cc
+--- a/gazebo/gui/GuiIface.cc
++++ b/gazebo/gui/GuiIface.cc
+@@ -303,8 +303,8 @@
+ g_argv = new char*[g_argc];
+ for (int i = 0; i < g_argc; i++)
+ {
+- g_argv[i] = new char[strlen("gazebo")];
+- snprintf(g_argv[i], strlen("gazebo"), "gazebo");
++ g_argv[i] = new char[strlen("gazebo") + 1];
++ snprintf(g_argv[i], strlen("gazebo") + 1, "gazebo");
+ }
+
+ // Register custom message handler
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/gazebo.git
More information about the debian-science-commits
mailing list