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]

 



On Mon May 8 2023 23:41:03 Dr. Nikolaus Klepp via tde-devels wrote:
> > https://dwheeler.com/secure-programs/Secure-Programs-HOWTO/dangers-c.html
>
> Sorry to spoil the party, but on this page contains errors (I have not read
> further ) "read(fd, &len, sizeof(len));" is utterly BS.

That's a perfectly reasonable way to read a binary integer into len if you
know that the integer to be read is compatible with the size_t of the arch.
For example if you are merely piping data between parent and child processes.

However the result of the read should have been checked and then the data
read into len should also have been thoroughly checked.

The examples exist to point out the dangers of not validating lengths and
of confusing size_t, int, and unsigned int - all of which may be different.

--Mike
____________________________________________________
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