debian/0000755000000000000000000000000012224601237007165 5ustar debian/watch0000644000000000000000000000057512224601174010225 0ustar # only show versions with even second digit, as the odd ones are development # versions, which shouldn't be shipped in a stable release version=3 opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|b|a)\d*)$/$1~$2/,dversionmangle=s/\+(debian|dfsg|ds|deb)\d*$// \ https://github.com/stephane/libmodbus/tags .*/v?(\d\.\d?[02468]\..*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz)) debian/source/0000755000000000000000000000000012224601174010465 5ustar debian/source/format0000644000000000000000000000001412224601174011673 0ustar 3.0 (quilt) debian/rules0000755000000000000000000000027712224601174010253 0ustar #!/usr/bin/make -f %: dh $@ --with autoreconf --parallel override_dh_installchangelogs: dh_installchangelogs NEWS override_dh_auto_configure: dh_auto_configure -- --disable-silent-rules debian/patches/0000755000000000000000000000000012224601174010614 5ustar debian/patches/series0000644000000000000000000000003312224601174012025 0ustar 01-add-length-checks.patch debian/patches/01-add-length-checks.patch0000644000000000000000000000230012224601174015313 0ustar Description: Fix crash with length check on long reads Long read requests, e.g. 140 bytes, can make libmodbus crash. This patch fixes it. Author: Josef Holzmayr Bug-Debian: http://bugs.debian.org/664740 --- src/modbus.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) --- a/src/modbus.c +++ b/src/modbus.c @@ -833,7 +833,8 @@ case _FC_WRITE_MULTIPLE_COILS: { int nb = (req[offset + 3] << 8) + req[offset + 4]; - if ((address + nb) > mb_mapping->nb_bits) { + if ((address + nb) > mb_mapping->nb_bits || + nb > MODBUS_MAX_WRITE_BITS) { if (ctx->debug) { fprintf(stderr, "Illegal data address %0X in write_bits\n", address + nb); @@ -855,7 +856,8 @@ case _FC_WRITE_MULTIPLE_REGISTERS: { int nb = (req[offset + 3] << 8) + req[offset + 4]; - if ((address + nb) > mb_mapping->nb_registers) { + if ((address + nb) > mb_mapping->nb_registers || + nb > MODBUS_MAX_WRITE_REGISTERS) { if (ctx->debug) { fprintf(stderr, "Illegal data address %0X in write_registers\n", address + nb); debian/libmodbus5.symbols0000644000000000000000000000506312224601174012650 0ustar libmodbus.so.5 libmodbus5 #MINVER# _error_print@Base 3.0.2 _modbus_init_common@Base 3.0.2 _modbus_rtu_backend@Base 3.0.2 _modbus_rtu_check_integrity@Base 3.0.2 _modbus_rtu_close@Base 3.0.2 _modbus_rtu_filter_request@Base 3.0.2 _modbus_rtu_flush@Base 3.0.2 _modbus_rtu_prepare_response_tid@Base 3.0.2 _modbus_rtu_recv@Base 3.0.2 _modbus_rtu_select@Base 3.0.2 _modbus_rtu_send@Base 3.0.2 _modbus_rtu_send_msg_pre@Base 3.0.2 _modbus_tcp_backend@Base 3.0.2 _modbus_tcp_build_request_basis@Base 3.0.2 _modbus_tcp_build_response_basis@Base 3.0.2 _modbus_tcp_check_integrity@Base 3.0.2 _modbus_tcp_close@Base 3.0.2 _modbus_tcp_filter_request@Base 3.0.2 _modbus_tcp_flush@Base 3.0.2 _modbus_tcp_pi_backend@Base 3.0.2 _modbus_tcp_pre_check_confirmation@Base 3.0.2 _modbus_tcp_prepare_response_tid@Base 3.0.2 _modbus_tcp_recv@Base 3.0.2 _modbus_tcp_select@Base 3.0.2 _modbus_tcp_send@Base 3.0.2 _modbus_tcp_send_msg_pre@Base 3.0.2 _sleep_and_flush@Base 3.0.2 libmodbus_version_major@Base 3.0.2 libmodbus_version_micro@Base 3.0.2 libmodbus_version_minor@Base 3.0.2 modbus_close@Base 3.0.2 modbus_connect@Base 3.0.2 modbus_flush@Base 3.0.2 modbus_free@Base 3.0.2 modbus_get_byte_from_bits@Base 3.0.2 modbus_get_byte_timeout@Base 3.0.2 modbus_get_float@Base 3.0.2 modbus_get_header_length@Base 3.0.2 modbus_get_response_timeout@Base 3.0.2 modbus_get_socket@Base 3.0.2 modbus_mapping_free@Base 3.0.2 modbus_mapping_new@Base 3.0.2 modbus_new_rtu@Base 3.0.2 modbus_new_tcp@Base 3.0.2 modbus_new_tcp_pi@Base 3.0.2 modbus_read_bits@Base 3.0.2 modbus_read_input_bits@Base 3.0.2 modbus_read_input_registers@Base 3.0.2 modbus_read_registers@Base 3.0.2 modbus_receive@Base 3.0.2 modbus_receive_confirmation@Base 3.0.2 modbus_reply@Base 3.0.2 modbus_reply_exception@Base 3.0.2 modbus_report_slave_id@Base 3.0.2 modbus_rtu_get_serial_mode@Base 3.0.2 modbus_rtu_set_serial_mode@Base 3.0.2 modbus_send_raw_request@Base 3.0.2 modbus_set_bits_from_byte@Base 3.0.2 modbus_set_bits_from_bytes@Base 3.0.2 modbus_set_byte_timeout@Base 3.0.2 modbus_set_debug@Base 3.0.2 modbus_set_error_recovery@Base 3.0.2 modbus_set_float@Base 3.0.2 modbus_set_response_timeout@Base 3.0.2 modbus_set_slave@Base 3.0.2 modbus_set_socket@Base 3.0.2 modbus_strerror@Base 3.0.2 modbus_tcp_accept@Base 3.0.2 modbus_tcp_listen@Base 3.0.2 modbus_tcp_pi_accept@Base 3.0.2 modbus_tcp_pi_listen@Base 3.0.2 modbus_write_and_read_registers@Base 3.0.2 modbus_write_bit@Base 3.0.2 modbus_write_bits@Base 3.0.2 modbus_write_register@Base 3.0.2 modbus_write_registers@Base 3.0.2 strlcpy@Base 3.0.2 debian/libmodbus5.install0000644000000000000000000000004412224601174012620 0ustar debian/tmp/usr/lib/*/libmodbus.so.* debian/libmodbus5.docs0000644000000000000000000000001012224601174012073 0ustar AUTHORS debian/libmodbus-dev.manpages0000644000000000000000000000011212224601174013430 0ustar debian/tmp/usr/share/man/man3/* debian/tmp/usr/share/man/man7/libmodbus.7 debian/libmodbus-dev.install0000644000000000000000000000015612224601174013313 0ustar debian/tmp/usr/include/modbus/* debian/tmp/usr/lib/*/libmodbus.so debian/tmp/usr/lib/*/pkgconfig/libmodbus.pc debian/libmodbus-dev.examples0000644000000000000000000000003212224601174013454 0ustar tests/*.[ch] tests/README debian/libmodbus-dev.docs0000644000000000000000000000003512224601174012571 0ustar MIGRATION README.rst AUTHORS debian/copyright0000644000000000000000000000434712224601174011130 0ustar This package was debianized by Stéphane Raimbault on Wed, 14 May 2008 22:30:53 +0200 It was downloaded from Upstream Author: Stéphane Raimbault Copyright: License for libmodbus: This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/LGPL-2.1 License for the tests: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". The Debian packaging is: Copyright (C) 2008-2011 Stéphane Raimbault Copyright (C) 2011-2012 Ivo De Decker and is licensed under the LGPL version 2.1 or later, see "/usr/share/common-licenses/LGPL-2.1". debian/control0000644000000000000000000000200412224601174010564 0ustar Source: libmodbus Priority: extra Maintainer: Ivo De Decker Standards-Version: 3.9.4 Section: libs Build-Depends: debhelper (>= 9), asciidoc, xmlto, dh-autoreconf Homepage: http://libmodbus.org/ Package: libmodbus5 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same Description: library for the Modbus protocol A Modbus library written in C, to send/receive data with a device which respects the Modbus protocol. This library can use a serial port or an Ethernet connection. . This package contains the shared library. Package: libmodbus-dev Section: libdevel Architecture: any Depends: libmodbus5 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: development files for the Modbus protocol library A Modbus library written in C, to send/receive data with a device which respects the Modbus protocol. This library can use a serial port or an Ethernet connection. . This package contains the development files. debian/compat0000644000000000000000000000000212224601174010363 0ustar 9 debian/changelog0000644000000000000000000000736312224601174011050 0ustar libmodbus (3.0.5-1) unstable; urgency=low * New upstream release * Refresh 01-add-length-checks.patch, as most changes have been superseded upstream -- Ivo De Decker Mon, 07 Oct 2013 20:50:25 +0200 libmodbus (3.0.4-1) unstable; urgency=low * New upstream release * Update standards-version to 3.9.4 (no changes) * Enable parallel build * Enable verbose build to show compiler flags to build log checks * Update watch file to filter out unstable versions -- Ivo De Decker Sun, 30 Jun 2013 12:25:01 +0200 libmodbus (3.0.3-4) unstable; urgency=low * Upload to unstable * Update watch file, thanks to Bart Martens -- Ivo De Decker Mon, 13 May 2013 21:07:59 +0200 libmodbus (3.0.3-3) experimental; urgency=low * Fix watch file * Switch to debhelper * Remove Build-Depends on cdbs * Multiarch support -- Ivo De Decker Sun, 11 Nov 2012 19:16:34 +0100 libmodbus (3.0.3-2) experimental; urgency=low * Install upstream changelog correctly. -- Ivo De Decker Sat, 09 Jun 2012 16:26:41 +0200 libmodbus (3.0.3-1) unstable; urgency=low * Acknowledge NMU, thanks to Roland Stigge and Josef Holzmayr * New upstream release * Update standards-version to 3.9.3 (no changes) * Move to debhelper compatibility level 9 * Add symbols file * Add watch file -- Ivo De Decker Sat, 26 May 2012 14:19:39 +0200 libmodbus (3.0.2-1.1) unstable; urgency=low * Non-maintainer upload. * Added patch: Fix crash by adding length checks (Closes: #664740) thanks to Josef Holzmayr -- Roland Stigge Fri, 30 Mar 2012 09:45:51 +0200 libmodbus (3.0.2-1) unstable; urgency=low * New upstream release * Update standards-version to 3.9.2 (no changes) * Use dh-autoreconf * Update copyright years -- Ivo De Decker Mon, 20 Feb 2012 17:18:27 +0100 libmodbus (3.0.1-2) unstable; urgency=low * Initial Debian release -- Ivo De Decker Thu, 11 Aug 2011 19:53:33 +0200 libmodbus (3.0.1-1) unstable; urgency=low * New upstream release -- Stéphane Raimbault Mon, 18 Jul 2011 22:27:40 +0200 libmodbus (3.0.0-1) unstable; urgency=low * New upstream release -- Stéphane Raimbault Mon, 11 Jul 2011 23:23:32 +0200 libmodbus (2.9.4-1) maverick; urgency=low * New upstream release -- Stéphane Raimbault Sun, 05 Jun 2011 12:38:34 +0200 libmodbus (2.9.3-1) maverick; urgency=low * New upstream release -- Stéphane Raimbault Fri, 14 Jan 2011 00:37:20 +0100 libmodbus (2.9.2-1) maverick; urgency=low * New upstream release -- Stéphane Raimbault Mon, 4 Oct 2010 13:21:52 +0200 libmodbus (2.0.3-1) intrepid; urgency=low * New upstream release -- Stéphane Raimbault Sun, 22 Mar 2009 12:16:52 +0200 libmodbus (2.0.2-1) hardy; urgency=low * New upstream release -- Stéphane Raimbault Sun, 10 Aug 2008 16:44:49 +0200 libmodbus (2.0.1-1) hardy; urgency=low * New upstream release -- Stéphane Raimbault Thu, 03 Jul 2008 21:47:52 +0200 libmodbus (2.0.0-2) hardy; urgency=low * Add test files to examples directory in libmodbus-dev. * Add MIGRATION file to libmodbus-dev. * Define the compatibility level to 6. -- Stéphane Raimbault Sun, 18 May 2008 14:30:23 +0200 libmodbus (2.0.0-1) hardy; urgency=low * Initial release. -- Stéphane Raimbault Wed, 14 May 2008 22:30:53 +0200