| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Somewhat hard to read and the code base already has many overlong
lines.
Found with below spatch file and some manual editing in ax25/access.c
to restore a comment lost by spatch.
@parens@
expression E, F, G;
binary operator X;
statement S;
@@
- if ((E = F) X G)
+ E = F;
+ if (E X G)
S
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When printing an error message for configurations using particularly
long file names a buffer overflow may occur potencially resulting in
malfunction or crash.
This fixes the following GCC 7.1.1 warnings:
gcc -DHAVE_CONFIG_H -I. -I.. -D_GNU_SOURCE -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/us
r/local/var/ax25/"\" -g -O2 -Wall -MT kissnetd.o -MD -MP -MF .deps/kissnetd.Tpo -c -o kissnetd.o kissnetd.c
kissnetd.c: In function ‘main’:
kissnetd.c:124:38: warning: ‘%s’ directive writing up to 4095 bytes into a region of size 66 [-Wformat-overflow=]
sprintf(MyString, "cannot reopen %s", PortList[PortNumber]->Name);
^~
kissnetd.c:124:5: note: ‘sprintf’ output between 15 and 4110 bytes into a destination of size 80
sprintf(MyString, "cannot reopen %s", PortList[PortNumber]->Name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kissnetd.c:143:49: warning: ‘%s’ directive writing up to 4095 bytes into a region of size 55 [-Wformat-overflow=]
sprintf(MyString, "Cannot unlock pts-device %s\n", PortList[PortNumber]->namepts);
^~
kissnetd.c:143:5: note: ‘sprintf’ output between 27 and 4122 bytes into a destination of size 80
sprintf(MyString, "Cannot unlock pts-device %s\n", PortList[PortNumber]->namepts);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kissnetd.c:154:50: warning: ‘%s’ directive writing up to 4095 bytes into a region of size 54 [-Wformat-overflow=]
sprintf(MyString, "cannot reopen ptmx (slave %s).", PortList[PortNumber]->namepts);
^~
kissnetd.c:154:5: note: ‘sprintf’ output between 29 and 4124 bytes into a destination of size 80
sprintf(MyString, "cannot reopen ptmx (slave %s).", PortList[PortNumber]->namepts);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gcc -DHAVE_CONFIG_H -I. -I.. -D_GNU_SOURCE -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -Wall -pedantic -MT mkiss.o -MD -MP -MF .deps/mkiss.Tpo -c -o mkiss.o mkiss.c
mkiss.c: In function ‘poll’:
mkiss.c:67:15: warning: overflow in implicit constant conversion [-Woverflow]
#define FEND 0300 /* Frame End (0xC0) */
^
mkiss.c:148:14: note: in expansion of macro ‘FEND’
buffer[0] = FEND;
^~~~
mkiss.c:67:15: warning: overflow in implicit constant conversion [-Woverflow]
#define FEND 0300 /* Frame End (0xC0) */
^
mkiss.c:150:14: note: in expansion of macro ‘FEND’
buffer[2] = FEND;
^~~~
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__USE_XOPEN doesn't work to get ptsname() etc. from libc. This is
Linux-specific software so convert to _GNU_SOURCE.
make[2]: Entering directory '/home/ralf/src/ax25/ax25-tools/kiss'
gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O
2 -Wall -pedantic -MT kissattach.o -MD -MP -MF .deps/kissattach.Tpo -c -o kissattach.o kissattach.c
kissattach.c: In function ‘main’:
kissattach.c:312:18: warning: implicit declaration of function ‘ptsname’ [-Wimplicit-function-declaration]
if ((namepts = ptsname(fd)) == NULL) {
^~~~~~~
kissattach.c:312:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
if ((namepts = ptsname(fd)) == NULL) {
^
kissattach.c:317:7: warning: implicit declaration of function ‘unlockpt’ [-Wimplicit-function-declaration]
if (unlockpt(fd) == -1) {
^~~~~~~~
[...]
gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -Wall -pedantic -MT kissnetd.o -MD -MP -MF .deps/kissnetd.Tpo -c -o kissnetd.o kissnetd.c
kissnetd.c: In function ‘ReopenPort’:
kissnetd.c:134:16: warning: implicit declaration of function ‘ptsname’ [-Wimplicit-function-declaration]
if ((npts = ptsname(PortList[PortNumber]->Fd)) == NULL) {
^~~~~~~
kissnetd.c:134:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
if ((npts = ptsname(PortList[PortNumber]->Fd)) == NULL) {
^
kissnetd.c:143:8: warning: implicit declaration of function ‘unlockpt’ [-Wimplicit-function-declaration]
if (unlockpt(PortList[PortNumber]->Fd) == -1) {
^~~~~~~~
[...]
gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -Wall -pedantic -MT mkiss.o -MD -MP -MF .deps/mkiss.Tpo -c -o mkiss.o mkiss.c
mkiss.c: In function ‘poll’:
mkiss.c:68:15: warning: overflow in implicit constant conversion [-Woverflow]
#define FEND 0300 /* Frame End (0xC0) */
^
mkiss.c:149:14: note: in expansion of macro ‘FEND’
buffer[0] = FEND;
^~~~
mkiss.c:68:15: warning: overflow in implicit constant conversion [-Woverflow]
#define FEND 0300 /* Frame End (0xC0) */
^
mkiss.c:151:14: note: in expansion of macro ‘FEND’
buffer[2] = FEND;
^~~~
mkiss.c: In function ‘main’:
mkiss.c:568:16: warning: implicit declaration of function ‘ptsname’ [-Wimplicit-function-declaration]
if ((npts = ptsname(pty[i]->fd)) == NULL) {
^~~~~~~
mkiss.c:568:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
if ((npts = ptsname(pty[i]->fd)) == NULL) {
^
mkiss.c:578:8: warning: implicit declaration of function ‘unlockpt’ [-Wimplicit-function-declaration]
if (unlockpt(pty[i]->fd) == -1) {
^~~~~~~~
mkiss.c:672:33: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog(LOG_ERR, "tty->fd: %m");
^
mkiss.c:698:38: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog(LOG_ERR, "pty[%d]->fd: %m\n", i);
[...] ^
gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -Wall -pedantic -MT net2kiss.o -MD -MP -MF .deps/net2kiss.Tpo -c -o net2kiss.o net2kiss.c
net2kiss.c: In function ‘main’:
net2kiss.c:630:18: warning: implicit declaration of function ‘ptsname’ [-Wimplicit-function-declaration]
if ((namepts = ptsname(fdpty)) == NULL) {
^~~~~~~
net2kiss.c:630:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
if ((namepts = ptsname(fdpty)) == NULL) {
^
net2kiss.c:635:7: warning: implicit declaration of function ‘unlockpt’ [-Wimplicit-function-declaration]
if (unlockpt(fdpty) == -1) {
^~~~~~~~
[...]
gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -Wall -pedantic -MT m6pack.o -MD -MP -MF .deps/m6pack.Tpo -c -o m6pack.o m6pack.c
m6pack.c: In function ‘main’:
m6pack.c:537:16: warning: implicit declaration of function ‘ptsname’ [-Wimplicit-function-declaration]
if ((npts = ptsname(pty[i]->fd)) == NULL) {
^~~~~~~
m6pack.c:537:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
if ((npts = ptsname(pty[i]->fd)) == NULL) {
^
m6pack.c:545:8: warning: implicit declaration of function ‘unlockpt’ [-Wimplicit-function-declaration]
if (unlockpt(pty[i]->fd) == -1) {
^~~~~~~~
m6pack.c:626:33: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
syslog(LOG_ERR, "tty->fd: %m");
^
m6pack.c:658:29: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=]
"pty[%d]->fd: %m\n",i);
^
[...]
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
| |
This uses a setlocalversion script derived from the kernel's
scripts/setlocalversion.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
| |
The version number has not been changed ever since ax25-tools 0.0.1 making
the version useless for bug reporting.
Make sure the banner printed by kissnetd stays properly formatted
even if the version string's length changes.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -MT mkiss.o -MD -MP -MF .deps/mkiss.Tpo -c -o mkiss.o mkiss.c
mkiss.c: In function ‘main’:
mkiss.c:469:4: error: format not a string literal and no format arguments [-Werror=format-security]
fprintf(stderr, usage_string);
^
mkiss.c:475:3: error: format not a string literal and no format arguments [-Werror=format-security]
fprintf(stderr, usage_string);
^
mkiss.c:480:3: error: format not a string literal and no format arguments [-Werror=format-security]
fprintf(stderr, usage_string);
^
cc1: some warnings being treated as errors
The strings are constants in the application code itself so no security
issues.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the automake warnings:
6pack/Makefile.am:10: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
Makefile.am:9: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
ax25/Makefile.am:26: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
hdlcutil/Makefile.am:16: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
kiss/Makefile.am:11: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
netrom/Makefile.am:28: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
rose/Makefile.am:15: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
tcpip/Makefile.am:27: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
INCLUDES has been deprecated since automake 1.5.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
| |
Indentation by tabs only. Move case labels in switches are on the same
level as the switch keyword.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
| |
They only inflate the .data section of the binary. Initializations to
FALSE are still left to do.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
| |
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
|
|
|
|
|
|
| |
they handled lines starting with '#' correctly, but complain (and
refuse to work) if the lines are empty (-- this is in contrast
to programs like call which use libax25 and work with empty lines).
this small patch fixes this issue.
|
|
|
|
| |
port). Example: This is done by "mkiss /dev/ttyUSB0 none /dev/ptmx
|
| |
|
|
|
|
|
|
|
|
| |
install-exec-local hooks may be run in parallel. This may result in
the attempted installation of files into directories before they have
been created. Fixed by using install-exec-hook instead.
Reported and axgetput-only patch by Thomas Beierlein <tb@forth-ev.de>.
|
|
|
|
|
|
| |
Glibc as old as 2.2 provides working headers under the right name and
if not libax25 would install headers under the right name so this has
become redundant and ugly.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Keeping generated files in CVS doesn't only tend to produce large and
cluttered files it also may result in build problems due to timestamps
in the wrong order. So dump everything, update .cvsignore to ignore
these files and resolve all warnings generated by autoreconf.
From now on users of a CVS checkout should run the command
autoreconf --install --force
after having done a CVS checkout. For this to succeed automake, autoconf
and libtool will have to be installed.
|
| |
|
|
|
|
| |
Thanks to dk2crn.
|
| |
|
|
|
|
|
| |
Syslog logging.
Bugfixes: buffer-length assurances; do never change char *foo = "bar".
|
|
|
|
|
|
|
|
|
| |
The num devices are written to stdout and could easily used
in startp scripts.
Introduced PATH_MAX for the pty name.
Kiss header for crc smack and rmnc are now supported.
write return code is now honoured.
Thanks to dk2crn for contriution.
|
| |
|
| |
|
|
|
|
|
| |
Now it does not block on
PTY=$(./kissattach /dev/ptmx ax4 2>&1|tail -1)
|
|
|
|
| |
Thanks to Christoph Rueckert <dk2crn>.
|
| |
|
| |
|
|
|
|
| |
pointless comments.
|
| |
|
| |
|
|
|
|
| |
- minor fix
|
|
|
|
| |
- New -b option. IFF_BROADCAST disabled by default now.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|