Commit e285726
Update libmodbus to address CVE-2022-0367 (#3)
* Move malloc before starting unit tests
* Fix warning issues
When compiling with gcc and option -Wconversion it fixes the
warning message
warning: conversion from ‘X’ {aka ‘x’} to ‘Y’ {aka ‘y’} may change value
Signed-off-by: José Bollo <[email protected]>
* Add modbus_[get|set]_indication_timeout to doc build
* docs: fix simple typo, reponse -> response
There is a small typo in tests/bandwidth-client.c.
Should read `response` rather than `reponse`.
* Update README.md
Add Embox RTOS to the list of supported OSes
* Install the NEWS and AUTHORS files
Fix stephane#513
* Include the test LICENSE in tarball
Fix for stephane#542
* Add .clabot
* typo
* Replace .dir-locals.el (Emacs) by .editorconfig
* Fix many typos
Thanks to @peternewman
* cosmetic changes in man page standardizing itemization
* Add FUNDING.yml
* Add the baud rate of 256k for Windows (closes stephane#603)
* Remove duplicate ';' (closes stephane#602)
* Fix position of CC flags in documentation (closes stephane#599)
* Replace obsolete AC_PROG_CC_STDC by AC_PROG_CC
* Fix typo in comment (closes stephane#588)
Thank you @qqq89513
* Add SECURITY.md (closes stephane#613)
* modbus_reply: fix copy & paste error in sanity check (fixes stephane#614)
While handling MODBUS_FC_WRITE_AND_READ_REGISTERS, both address offsets
must be checked, i.e. the read and the write address must be within the
mapping range.
At the moment, only the read address was considered, it looks like a
simple copy and paste error, so let's fix it.
Signed-off-by: Michael Heimpold <[email protected]>
* Bump version to 3.1.7
* Minor changes to NEWS
* Fix typos (closes stephane#620)
* Add many contributors to .clabot
* Minor documentation correction
Sorry for the two PRs, I did one then realized I should check the other
* Minor documentation correction
* Fix network library detection on Haiku
* Fix typo on connection (closes stephane#586).
Thank you @peternewman.
* Add rm5248 to .clabot
* Fix comment about EMBUNKEXC (closes stephane#566)
This native libmodbus error code is defined but not used.
* Fix float endianness issue on big endian architecture.
It converts float values depending on what order they come in.
This patch was modified from rm5248 [1]
[1] synexxus@a511768
* Make sub-command more clear
* Swap CRC bytes in request data but not at CRC computing (stephane#397)
* address check in single register / coil responses added (stephane#463)
Address check in single register / coil responses added
According to Modbus standard the address of single register / coils request and response must match
Co-authored-by: Heinrich Gsponer <[email protected]>
* Add contributors to .clabot
* VCLinkerTool version 1.0.0 to 1.0, NO link error
Even the newest visual studio use /VERSION:major[.minor] .
It means link.exe /VERSION:1.0 just need two version number .
If Version = 1.0.0 , when visual studio link the program , vs will produce link error:
```
1>"/OUT:C:\Users\Lenovo\Desktop\libmodbus-master\src\win32\modbus.dll" "/VERSION:1.0.0" /INCREMENTAL:NO /NOLOGO ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG "/PDB:C:\Users\Lenovo\Desktop\libmodbus-master\src\win32\modbus.pdb" /MAP /SUBSYSTEM:CONSOLE /TLBID:1 "/IMPLIB:C:\Users\Lenovo\Desktop\libmodbus-master\src\win32\modbus.lib" /MACHINE:X86 /SAFESEH /DLL "C:\Users\Lenovo\Desktop\libmodbus-master\src\win32\/modbus.res"
1>"Debug\modbus-data.obj"
1>"Debug\modbus-rtu.obj"
1>"Debug\modbus-tcp.obj"
1>Debug\modbus.obj
1>LINK : fatal error LNK1117: option“VERSION:1.0.0” grammatical error
```
see:
https://docs.microsoft.com/en-us/cpp/build/reference/version-version-information?view=msvc-160
* Add jcarrano to CLA
* Update .gitignore
* Add build check to CI
* Add autogen.sh call
* Remove check target (duplicate of distcheck)
* Replace Travis CI badge by GitHub CI
* Merge NEWS with v3.0.x branch
* Fixed MODBUS_ERROR_RECOVERY_LINK not working on Windows.
* Fixed a typo error in a comment.
* Do not change the behavior for non-windows OS.
* Reduce memory use of TCP PI backend (closes stephane#621)
- allocate exact memory required to store node and service strings
instead of around 1kb of static memory.
- accept NULL value of service to use default Modbus port number (502)
- unit test updated
The new documentation will be updated in another commit.
* Rewrite documentation with Material for mkdocs
- remove doc build from autotools
- don't depend anymore on asciidoc
- don't provide man pages anymore
- new illustrations
- provide mkdocs instructions
* Bump version to 3.1.8
* Remove travis.yml
* Minor adjustments to MD files
* Remove year range in Copyright
* Move migration content to libmodbus.org
* Avoid negative value in FD_SET call
* Test socket against positive value instead of -1
* Add 0x34d to .clabot
* Add jordanjohnson56 to CLA
* Have autogen.sh fail if autoreconf fails
If the autoreconf program does not succeed, autogen.sh
should not succeed either.
The definition of "succeed" being "exit with exit code 0".
* Have autoreconf fail if LT_INIT is not defined
If the LT_INIT macro is not available in a *.m4 file to be
found during the autoreconf run, it is impossible to build
a useful configure script.
Therefore, we blacklist the LT_INIT macro so when it appears
unexpanded in the configure script, autoreconf will report
the failure instead of silently creating a broken configure.
This is generally a good idea for any macro not shipped with
Automake or Autoconf.
* Fix doc links
* test the protocol id for 0
previous test would fail if one byte was non zero.
* Fix double negative in tests
* New quirks handler (closes stephane#38 stephane#533)
Useful functions when you are confronted with equipment which does
not respect the protocol, which behaves strangely or when you wish
to move away from the standard.
Thank you @mhei for the great initial version.
* Fix bitwise OR in documentation
* Improve doc about slave ID in RTU
* Add .clang-format and format code (closes stephane#394)
Thank you @pboettch for initial proposal.
* Remove constraints on baud rate values
* Accept IP or device in arg of unit test progs
* Avoid compilation issue with VS2022 with strdup
* Display created files in configure.js
* Use strcpy_s under Windows
* Replace inet_addr by inet_pton calls
* Replace inet_ntoa by inet_ptop
- check conversion
- display IP in in IPv6
* Update configure.ac/config.h.win32 for new inet functions
* Instructions to build libmodbus in a VS project
Tested with Visual Studio 2022.
* Updated CLA bot file
* Fix connection check for Windows RTU (closes stephane#660, stephane#662)
* Add CIFuzz Github action
* Convert a few int to unsigned int (stephane#402)
* Fix wrong close on recent commit 5a6efec
* Adjust fuzzing to run on main branch only
* Bump version to 3.1.9
* fix modbus quirks function definition
* Split POSIX and Windows RTU connect functions
Easier to read
* Fix setting baud rate for Linux (partial revert of fa20798)
* Remove fuzzing action in waiting for a fix
* Bump version to 3.1.10
* docs: small re-wordings, fix various small typos and style issues
Signed-off-by: Michael Heimpold <[email protected]>
* Update CLA
* Fix doc of modbus_mapping_new_start_address (stephane#615)
* Free addrinfo struct on getaddrinfo() errors
* Minor to docs
* Add polar.sh to FUNDING
* Fix errno value on timeout with TCP connect (closes stephane#736, stephane#756)
Thank you kyllingstad for the issue and psychon for the fix.
* Update CLA
* Log error in read input registers if debug (closes stephane#755)
* Add checks for netinet/ip.h and gai_strerror
Extracted from stephane#745
* Don't use gai_strerror if not available
Identical check to stephane#745
* stephane#675 fix wrong generated version for double number
* adding modbus_send_raw_request_tid
* doc
* doc
* Don't use loop initial declaration (closes stephane#752)
C99 remains too modern :/
* Minor format
* Update docs about memory consumption (closes stephane#715)
Not true anymore since stephane#621
* Revert TCP checks for recovery (closes stephane#711)
Requires more tests on Windows with serial communications...
Related to db1cbc5 and 9b679b7.
* Link against socket and nsl libs when building on SunOS
On OpenIndiana (SunOS) functions such as bind, socket, listen
require -lnsl -lsocket to be given to linker.
* Format
* Fixes float encoding/decoding for both big and little endian (fixes stephane#665, stephane#694)
* Removes useless memcpy calls and no longer used swap32 and swap16 macros.
* Updated float encoding functions to consider endianess of 16-bit registers (fixes stephane#665)
* Deprecated modbus_get_float() and modbus_set_float() are implemented using cdab variants.
* Duplicate in .clabot
* Revert "Fixes float encoding/decoding for both big and little endian (fixes stephane#665, stephane#694)"
This reverts commit 13bd584.
* Remove useless cast in setsockopt call (closes stephane#721)
* Update CLA
* Fix insecure data handling
CID 416366: INTEGER_OVERFLOW found with Coverity Scan.
* Add Coverity scan status
* Remove duplicate warning flag
* Check length passed to modbus_reply (write_bit)
The modbus_reply function is designed to receive arguments
from modbus_receive. This patch avoid a wrong use of memcpy if
the user chooses to inject a bad length argument.
Thank you Nozomi Networks Labs Advisory for the report.
* Check length passed to modbus_reply (write_register)
Related to df79a02.
* Small cleanups of unit test server
* Rename warning flags variable
* Do not build with debug flag active by default
* Remove useless configure checks
* Update .clabot
* Fix request length check in modbus_reply in RTU
- rename internal *_prepare_response_tid to *_get_response_tid
- change signature, don't need req length anymore
- remove misleading modification of req_length
- check of req length before use in memcpy for mask write register
Related to df79a02
* Revert "Fix float endianness issue on big endian architecture." and fix test suite and setter functions.
This reverts commit 49af73d.
* Prepare NEWS file for next release
* Use port 502 instead of 1502 in documentation (closes stephane#771)
The default port number of Modbus is 502 but it requires privileges on
Linux.
* HAVE_NETINET_IN_H as guard around header (stephane#765)
Thank you @diplfranzhoepfinger
* RTU - Check CRC before filtering on slave ID
* Minor
* Bump version to 3.1.11
* modbus-tcp.c doesn't include config.h, possible workaround - defining HAVE_NETINET_IP_H directly in modbus-tcp.c for Linux builds to force including <netinet/ip.h> which provides IPTOS_LOWDELAY definition
---------
Signed-off-by: José Bollo <[email protected]>
Signed-off-by: Michael Heimpold <[email protected]>
Co-authored-by: Stéphane Raimbault <[email protected]>
Co-authored-by: José Bollo <[email protected]>
Co-authored-by: Tim Gates <[email protected]>
Co-authored-by: Anton Bondarev <[email protected]>
Co-authored-by: Richard Ash <[email protected]>
Co-authored-by: Stefan Nilsson <[email protected]>
Co-authored-by: Marc Haber <[email protected]>
Co-authored-by: Michael Heimpold <[email protected]>
Co-authored-by: Rick M <[email protected]>
Co-authored-by: begasus <[email protected]>
Co-authored-by: SZ Lin (林上智) <[email protected]>
Co-authored-by: Mochamad Arifin <[email protected]>
Co-authored-by: Pascal Bach <[email protected]>
Co-authored-by: Heinrich Gsponer <[email protected]>
Co-authored-by: along <[email protected]>
Co-authored-by: Stéphane Raimbault <[email protected]>
Co-authored-by: Mohamed Amine Mzoughi <[email protected]>
Co-authored-by: Hans Ulrich Niedermann <[email protected]>
Co-authored-by: Jordan Johnson <[email protected]>
Co-authored-by: Alexander Polleti <[email protected]>
Co-authored-by: David Korczynski <[email protected]>
Co-authored-by: 20162026 <[email protected]>
Co-authored-by: Yau Yimsing <[email protected]>
Co-authored-by: Cedric Boudinet <[email protected]>
Co-authored-by: Lauri Nurmi <[email protected]>
Co-authored-by: Andreas Nicolai <[email protected]>
Co-authored-by: Andreas Nicolai <[email protected]>
Co-authored-by: diplfranzhoepfinger <[email protected]>1 parent 9b7a2f4 commit e285726
File tree
170 files changed
+6071
-4927
lines changed- .github
- workflows
- docs
- assets
- doc
- src
- win32
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
170 files changed
+6071
-4927
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
| |||
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
28 | | - | |
29 | 34 | | |
30 | | - | |
31 | | - | |
32 | 35 | | |
33 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
34 | 43 | | |
35 | 44 | | |
36 | 45 | | |
37 | 46 | | |
38 | 47 | | |
39 | 48 | | |
40 | | - | |
41 | 49 | | |
42 | 50 | | |
43 | 51 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
11 | | - | |
| 9 | + | |
| 10 | + | |
12 | 11 | | |
13 | | - | |
| 12 | + | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | | - | |
| 26 | + | |
28 | 27 | | |
29 | 28 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
0 commit comments