Re: [OT] iscan compiled on debian10 works and compiled on debian11 does not work

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

 



Mike Bird via tde-devels wrote:

> %as is looking for a float so let's ignore that.
> 

I found out %as means do not store (strip) the terminator \0.

> If we switch back to %s it's looking for a string which would be
> great except no memory has been allocated for the strings.
> 
> The attached works with both gcc and clang but the important thing
> to remember is NEVER NEVER NEVER use scanf or any variant thereof.

What do you mean it works with gcc? I have debian with gcc-10 and it does
following:

 $ ./test
String: interpreter usb 0x04b8
0x0142 /usr/lib/esci/libesci-interpreter-perfection-v330 /usr/share/esci/esfwad.bin
vendor   4b8
product  142
library  (null)
firmware (null)

> 
> https://dwheeler.com/secure-programs/Secure-Programs-HOWTO/dangers-c.html

I am not the owner of this code. It was working for the past 6y and as
reported when compiled last year in Buster it works as well, but now
compiled in Bullseye is not working.
For me it is not the matter of using it or not, but a change somewhere
either in gcc (Buster was using gcc-8) or in the libraries.

Also regarding the memory allocated. You are right. It is working if I
allocate memory and use %s instead of %as.
Why, oh, why?!

Is there some kind of flag or option for the compiler?

-- 
FCD6 3719 0FFB F1BF 38EA  4727 5348 5F1F DCFE BCB0

____________________________________________________
tde-devels mailing list -- devels@xxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devels-leave@xxxxxxxxxxxxxxxxxx
Web mail archive available at https://mail.trinitydesktop.org/mailman3/hyperkitty/list/devels@xxxxxxxxxxxxxxxxxx



[Index of Archives]     [Trinity Users]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [KDE]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]     [Trinity Desktop Environment]

  Powered by Linux