[prev in list] [next in list] [prev in thread] [next in thread]
List: wireshark-commits
Subject: [Wireshark-commits] master 3951759: Qt: avoid NULL to terminate a g_build_filename in ExportObjectMo
From: Wireshark code review <code-review-do-not-reply () wireshark ! org>
Date: 2019-07-29 19:55:45
Message-ID: 156443014020.1731.9096846293767957947 () srv3 ! frosun ! ops ! wireshark ! net
[Download RAW message or body]
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=3951759e83b30e245aa0e485688e5b7f1a0ee8e4
Submitter: "Peter Wu <peter@lekensteyn.nl>"
Changed: branch: master
Repository: wireshark
Commits:
3951759 by Peter Wu (peter@lekensteyn.nl):
Qt: avoid NULL to terminate a g_build_filename in ExportObjectModel
While documentation for g_build_filename suggests the use of NULL as
terminator, the C++ standard permits NULL to be defined as integer 0.
This potentially has a different size than a void pointer and can cause
crashes if this is the case. Instead of using (void*)0 as terminator,
let's just rewrite this piece to avoid the problem in its entirely.
Fixes "missing sentinel" warning in GCC with musl due to NULL being 0L.
Change-Id: I6a7911887eaeeaa56fdb03d14ee8b70a42c8a05b
Reviewed-on: https://code.wireshark.org/review/34107
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Actions performed:
from 04c12dd doc: document WIRESHARK_CONFIG_DIR
add 3951759 Qt: avoid NULL to terminate a g_build_filename in ExportObjectModel
Summary of changes:
ui/qt/models/export_objects_model.cpp | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
___________________________________________________________________________
Sent via: Wireshark-commits mailing list <wireshark-commits@wireshark.org>
Archives: https://www.wireshark.org/lists/wireshark-commits
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-commits
mailto:wireshark-commits-request@wireshark.org?subject=unsubscribe
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic