:: Re: [DNG] Nasty Linux systemd secur…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: tito
Fecha:  
A: dng
Asunto: Re: [DNG] Nasty Linux systemd security bug revealed
On Tue, 27 Jul 2021 13:11:47 -0400
Steve Litt <slitt@???> wrote:

> tito via Dng said on Tue, 27 Jul 2021 08:26:03 +0200
>
>
> >Ten Commandments
> >
> > 1) use the least amount of code possible
> > 2) try harder and go to point 1
> > 3) if the code doesn't fit into one screen go to point 2
> > 4) always initialize your vars at declaration time
> > 5) always set your vars to NULL after freeing them
> > 6) always check error codes of the functions you call and something
> > appropriate
> > 7) add comments about what and why you did (that ugly
> > hack)
> > 8) use meaningful (to others) names for your functions and vars
> > 9) your code must be readable to others like a children's book
> >10) if you don't know how to solve it, look what others did, then do
> >it your way (or forget Ctrl-C)
>
> Thanks Tito,
>
> This is a good part of what I was asking for. I'd like to add that you
> need to cleanse and length-check any user input that comes in.


Yes, forgot about that one, was a pain when I did my first
and last (til now) C + GTK + LIBMYSQL program for win32.

Tito

> SteveT
>
> Steve Litt
> Spring 2021 featured book: Troubleshooting Techniques of the Successful
> Technologist http://www.troubleshooters.com/techniques
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng