[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linrad] Linrad+ubuntu 9.10



Hi All,

I have received this bug report:
> yesterday I compiled xlinrad successfully on a 9.04 machine. Today I 
> tried it on 9.10 with no success. Do you have any idea what to do i.o. 
> to avoid those messages:
> 
> detlef@xxxxxxxxx:~/linrad$ make xlinrad
> gcc -D_FILE_OFFSET_BITS=64 lxsys.c -g -O -DOSNUM=1 -W -Wall -Wimplicit 
> -Wreturn-type -Wformat -m32 -Wunused -Wcomment -Wchar-subscripts 
> -Wshadow -Wuninitialized -Wparentheses -Wstrict-prototypes -Werror 
> -ffast-math -Wundef -fomit-frame-pointer -c -o lxsys.ol
> cc1: warnings being treated as errors
> In file included from /usr/include/stdio.h:910,
> from globdef.h:90,
> from lxsys.c:23:
> In function âsprintfâ,
> inlined from âlir_open_serportâ at lxsys.c:369:
> /usr/include/bits/stdio2.h:34: error: call to __builtin___sprintf_chk 
> will always overflow destination buffer
> make: *** [lxsys.ol] Fehler 1
> detlef@xxxxxxxxx:~/linrad$

The gcc compiler is changed now and then and it always becomes better.
I have not yet tried Ubuntu 9.10  myself, but obviously the latest
gcc (not yet included in Debian testing) has better error checking.

There is a serious error in Linrad. The array declared on line 22 in
lxsys.c like this:
char serport_name[]="/dev/ttyS?";
is used in line 369 like this:
sprintf(&serport_name[0],"%s","/dev/ttyUSB");
That will overwrite something else and it could be a disaster.

This variable is ONLY used if you are using (w)users_hwaredriver.c
to communicate with your transceiver.

The problem can be fixed like this:
char serport_name[12]="/dev/ttyS?";

(and a corresponding change for BSD on line 32)

73

Leif / SM5BSZ







--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Linrad" group.
To post to this group, send email to linrad@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to linrad+unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at http://groups.google.com/group/linrad?hl=en
-~----------~----~----~----~------~----~------~--~---

LINRADDARNIL