How to zero a buffer
daemonology.net
How to zero a buffer
1–10 of 216 posts
Re: How to zero a buffer
#2Re: How to zero a buffer
#3 static void * (* const volatile memset_ptr)(void *, int, size_t) = memset;
I've written some C but that is utter gibberish to me.Re: How to zero a buffer
#4Can someone explain this line: static void * (* const volatile memset_ptr)(void *, int, size_t) = memset; I've written some C but that is utter gibberish to me.
The "void *" before the first parenthesis is the return type of the function. The stuff in the first parenthesis applies to the function pointer variable. The second parenthesis lists the types of the arguments to memset.
Re: How to zero a buffer
#5He also runs http://www.tarsnap.com/ which is arguably the most secure (and cost effective) back up solution in the market.
(I'm in no way affiliated with Colin and/or Tarsnap. Just a fan of his work and humble attitude.)
Re: How to zero a buffer
#6Can someone explain this line: static void * (* const volatile memset_ptr)(void *, int, size_t) = memset; I've written some C but that is utter gibberish to me.
Re: How to zero a buffer
#7For those of you unaware, Colin Percival (author of the blog) was for many years the FreeBSD Security Officer and he's highly recognized in the field for his expertise. He also runs http://www.tarsnap.com/ which is arguably the most secure (and cost effective) back up solution in the market. (I'm in no way affiliated with Colin and/or Tarsnap. Just a fan of his work and humble attitude.)
I'm guessing you haven't seen the "comeback of all time" thread...
Re: How to zero a buffer
#8This sort of thing would be exactly what should go into the "Friendly C" dialect being chatted about the other day--for things like zeroing memory, it's very unexpected that a compiler would be like "nah, not feeling it...nobody will notice anyways".
Re: How to zero a buffer
#9Can someone explain this line: static void * (* const volatile memset_ptr)(void *, int, size_t) = memset; I've written some C but that is utter gibberish to me.
http://cdecl.ridiculousfish.com/?q=static+void+*+%28*+const+...
Re: How to zero a buffer
#10Can someone explain this line: static void * (* const volatile memset_ptr)(void *, int, size_t) = memset; I've written some C but that is utter gibberish to me.