SHA256
1
0
forked from pool/rtl-sdr
rtl-sdr/rtl-sdr-0004-fix-rtl_eeprom-warnings.patch

40 lines
1.2 KiB
Diff
Raw Normal View History

Accepting request 907681 from home:wkazubski:test:science - patches: rtl-sdr-0003-disable-zerocopy-by-default.patch rtl-sdr-0007-allow-build-rtlsdr-as-subroject.patch rtl-sdr-0008-add-CMP0075-policy.patch rtl-sdr-0016-add-missing-rtlsdrConfig.patch rtl-sdr-0017-add-rtl_biast-as-install-target.patch rtl-sdr-0018-fix-for-older-cmake.patch merged into rtl-sdr-0015-modernize-cmake-usage.patch - patch rtl-sdr-0005-add-rtlsdr_set_bias_tee_gpio.patch merged into rtl-sdr-0006-add-rtl_biast.patch - Added patches to upgrade to latest git head (only significant changes), including: + rtl-sdr-0001-mmap-bug-arm.patch + rtl-sdr-0002-fix-rtlsdr_open-memory-leak.patch + rtl-sdr-0003-disable-zerocopy-by-default.patch + rtl-sdr-0004-fix-rtl_eeprom-warnings.patch + rtl-sdr-0005-add-rtlsdr_set_bias_tee_gpio.patch + rtl-sdr-0006-add-rtl_biast.patch + rtl-sdr-0007-allow-build-rtlsdr-as-subroject.patch + rtl-sdr-0008-add-CMP0075-policy.patch + rtl-sdr-0009-fix-FC0013-UHF-reception.patch + rtl-sdr-0010-improve-librtlsdr_pc.patch + rtl-sdr-0011-improve-rtl_power--scanning-range-parsing.patch + rtl-sdr-0012-use-udev-uaccess_rules.patch (not used) + rtl-sdr-0013-add-IPV6-for-rtl_tcp.patch + rtl-sdr-0014-initialize-listensocket_in-rtl_tcp.patch + rtl-sdr-0015-modernize-cmake-usage.patch + rtl-sdr-0016-add-missing-rtlsdrConfig.patch + rtl-sdr-0017-add-rtl_biast-as-install-target.patch + rtl-sdr-0018-fix-for-older-cmake.patch + rtl-sdr-0019-fix-short-write-in-r82xx_read.patch + rtl-sdr-0020-populate-pkgconfig-with-prefix.patch * Full bias tee support for RTL-SDR v3 dongle * Command line utility rtl_biast for controlling bias tee * IPV-6 support for rtl_tcp * Fixed some bugs and compile time issues OBS-URL: https://build.opensuse.org/request/show/907681 OBS-URL: https://build.opensuse.org/package/show/hardware:sdr/rtl-sdr?expand=0&rev=21
2021-07-31 11:22:31 +02:00
From 3c263b745121d9f4df95fd06910a00eba98a2f11 Mon Sep 17 00:00:00 2001
From: Steve Markgraf <steve@steve-m.de>
Date: Fri, 1 Nov 2019 02:18:54 +0100
Subject: [PATCH] rtl_eeprom: fix warnings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Account for \0 string terminator when calling strncpy().
Fixes the following GCC 9 warning:
warning: __builtin_strncpy specified
bound 256 equals destination size
---
src/rtl_eeprom.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/rtl_eeprom.c b/src/rtl_eeprom.c
index f562d73..24be900 100644
--- a/src/rtl_eeprom.c
+++ b/src/rtl_eeprom.c
@@ -370,14 +370,14 @@ int main(int argc, char **argv)
}
if (manuf_str)
- strncpy((char*)&conf.manufacturer, manuf_str, MAX_STR_SIZE);
+ strncpy((char*)&conf.manufacturer, manuf_str, MAX_STR_SIZE - 1);
if (product_str)
- strncpy((char*)&conf.product, product_str, MAX_STR_SIZE);
+ strncpy((char*)&conf.product, product_str, MAX_STR_SIZE - 1);
if (serial_str) {
conf.have_serial = 1;
- strncpy((char*)&conf.serial, serial_str, MAX_STR_SIZE);
+ strncpy((char*)&conf.serial, serial_str, MAX_STR_SIZE - 1);
}
if (ir_endpoint != 0)