367 Commits

Author SHA1 Message Date
Stefan Wahren
858aea33ab add more checks in lower layers
to avoid segmentation faults, out of bounds access and integer overflow
make parseable for splint
suppress splint warnings about datatype cc_t
fix type of return value for read()
add checks before accessing tty
2013-05-13 08:41:38 +02:00
Stefan Wahren
a640295d1b Merge remote-tracking branch 'origin/master' 2013-05-12 21:27:55 +02:00
Stefan Wahren
4d85dad403 change TCP port datatype from int to uint16_t
because int doesn't match the range
add range check in every TCP binary
2013-05-12 21:26:38 +02:00
Stefan Wahren
ddd15c0373 extend baudrate from int to long
because 38400 baud could be bigger than INT_MAX
2013-05-12 16:23:27 +02:00
Robert Johansson
b0dff87093 Merge pull request #48 from lategoodbye/master
parseable for splint, fix memleaks, minor fixes
2013-05-12 01:26:39 -07:00
Stefan Wahren
c59e763a84 minor fixes
remove unreachable code
add parameter checks to mbus_data_bcd_encode
init time structure in mbus_data_tm_decode as possible
mark falltrough for splint
remove unused variable val
fix removed realloc
2013-05-04 22:43:23 +02:00
Stefan Wahren
ee209023b8 fix memleaks
avoid memleak if memory is full
fix "memleak" at the end of mbus_parse_hex
2013-05-04 19:17:27 +02:00
Stefan Wahren
3935b4013e make parseable for splint
- replace non standard u_char with unsigned char (ANSI)
- advice splint to ignore variadic macros
- move declarations from the middle to top of functions (C90)
- replace local library includes <> to ""
2013-05-04 18:14:18 +02:00
Robert Johansson
d6ac241d2f Merge pull request #47 from lategoodbye/master
Add missing initialization
2013-05-04 07:21:23 -07:00
Stefan Wahren
0d6bb583c2 add missing initialization (thanks to valgrind) 2013-05-03 17:23:18 +02:00
Robert Johansson
f7e5898636 Merge pull request #46 from lategoodbye/master
experimental feature application reset, better primary scan, equalize stderr output
2013-04-29 19:12:46 -07:00
Stefan Wahren
e1657399ff add new function to send application reset incl. subcode
fix typo in comment
add new program to test experimental feature application reset
add mbus-tcp-application-reset to build process
2013-04-27 13:16:44 +02:00
Stefan Wahren
f6601ca40f print all errors on stderr in all binaries 2013-04-26 08:18:17 +02:00
Stefan Wahren
ea0c6c3455 add new parameter to specify retries for mbus-serial-scan and
mbus-tcp-scan
make primary scan to retransmit SND_NKE in case of timeout so it's more
reliable but also slowlier
keep default behaviour, no retransmission
equalize mbus-serial-scan and mbus-tcp-scan
update man page
2013-04-25 21:19:41 +02:00
Robert Johansson
65c036f0d2 Merge pull request #45 from lategoodbye/master
fixes for doxygen
2013-04-18 08:24:30 -07:00
Stefan Wahren
153828268a combine typedef and struct to avoid same comments
combine enum and struct to avoid same comments
add comments for mbus_context_option
add missing parameters in comments
2013-04-17 22:46:04 +02:00
Robert Johansson
36223255b8 Merge pull request #44 from lategoodbye/master
fix some handling after memory allocation
2013-04-13 03:41:22 -07:00
Stefan Wahren
5d4002f423 revert last commit 2013-04-11 22:17:53 +02:00
Stefan Wahren
f07d4fc579 Merge remote-tracking branch 'upstream/master' 2013-04-11 22:12:16 +02:00
Stefan Wahren
5500db0898 add missing checks after memory allocation
add missing memset after memory allocation
2013-04-11 22:05:08 +02:00
Robert Johansson
903460846a Merge pull request #41 from tpltnt/master
version info added
2013-04-09 07:39:48 -07:00
Robert Johansson
db72e2dd49 Merge pull request #43 from lategoodbye/master
fix for issue #42
2013-04-09 07:37:25 -07:00
tpltnt
72ee386e10 version string as const char* 2013-04-09 10:18:27 +02:00
tpltnt
a3018692dc mbus_ prefix added 2013-04-06 19:05:45 +02:00
tpltnt
8fcdf3bf3b function declaration added 2013-04-05 15:13:18 +02:00
Stefan Wahren
450ac7b9f4 fix build error with automake 1.11 and should work with automake 1.12
too
2013-04-04 21:20:37 +02:00
tpltnt
c6fc41484f small function to get current version added 2013-04-04 00:49:03 +02:00
Robert Johansson
29b85226e1 Merge pull request #40 from lategoodbye/master
add rpm spec file
2013-03-30 19:29:07 -07:00
Stefan Wahren
80df5ce086 Merge remote-tracking branch 'upstream/master' 2013-03-29 16:51:05 +01:00
Stefan Wahren
31d8d829c6 add spec file for rpm based systems 2013-03-29 16:47:18 +01:00
Robert Johansson
43f8a2caf3 Merge pull request #39 from tpltnt/master
fixes for automake 1.12
2013-03-20 01:23:02 -07:00
tpltnt
55218f05ef AM_PROG_AR added 2013-03-19 23:33:51 +01:00
tpltnt
7bceca6c60 configure.ac improved after lots of hints 2013-03-19 23:28:54 +01:00
Robert Johansson
a7ac8c3136 Merge pull request #38 from keepfocus/master
Handle filler DIF
2013-03-17 01:40:14 -07:00
Jakob Skov-Pedersen
6166553755 Make my last change more readable.
As suggested by lategoodbye. Also make it more in line with the way
everything else is written.
2013-03-17 09:19:29 +01:00
Jakob Skov-Pedersen
363f59a149 Ignore filler DIF (= 0x2F) 2013-03-11 09:27:16 +01:00
Robert Johansson
91f0c87207 Merge pull request #37 from lategoodbye/master
replace magic numbers
2013-03-02 16:34:58 -08:00
Stefan Wahren
b1063db3bc replace magic numbers with defines
fix MBUS_MAX_PRIMARY_SLAVES to 250
2013-03-02 18:03:31 +01:00
Robert Johansson
b67ed06ffc Merge pull request #36 from tmtom/pkgconfig
Updated pkgconfig - added math lib dependency
2013-02-09 20:04:50 -08:00
Tmtom
70a4ef7f92 Updated pkgconfig - added math lib dependency 2013-02-09 22:35:16 +01:00
Robert Johansson
be6e49db16 Merge pull request #35 from aleax/bugfix
Fix undeclared variable
2013-01-14 02:37:42 -08:00
Alexey Bondarchuk
4cd114e911 Fix undeclared variable 2013-01-14 12:28:14 +02:00
Robert Johansson
86a7305f5e Merge pull request #34 from lategoodbye/master
Address check functions
2013-01-01 06:18:42 -08:00
Stefan Wahren
312eca72e5 fix logic of secondary address check 2012-12-31 13:53:40 +01:00
Stefan Wahren
e248d6e421 replace address parameter checks with new helper functions 2012-12-31 13:44:03 +01:00
Stefan Wahren
898ee57d41 replace address parameter checks with new helper functions 2012-12-31 13:42:27 +01:00
Stefan Wahren
61fd2aa1c7 add new helper functions to check primary and secondary addresses 2012-12-31 13:37:17 +01:00
Robert Johansson
a8cc7b0acd Merge pull request #33 from aleax/debian
Add libmbus1-dbg package.
2012-12-29 23:44:51 -08:00
Robert Johansson
a409a917b9 Merge pull request #32 from lategoodbye/master
Fix segmentation fault
2012-12-29 23:44:40 -08:00
Stefan Wahren
9c9c0201f9 add exploit for invalid length 2012-12-29 11:57:13 +01:00