We often need to store private data in programs, for example passwords, secret keys, and their derivatives, and we usually need to clear their traces in the memory after using them so that a potential intruder can’t gain access to these data. In this article we will discuss why you can’t clear private data using memset() function.
Sometimes, we need to create wrapper types. For example, types like
optional and similar.
Usually, these types have an accessor member function called
.get but they also provide the
operator-> to support direct access to the contained value similarly to what ordinary pointers do.
How do you think, which of existing programs can be called the greatest? Can you say about one of your programs that it is cooler than the others? There is an opinion which is not unreasonable that such program was written by David Horn in 1983: “1kb chess on the ZX81”.
Various devices are often shipped with extremely poor software. And that gets on nerves quite a bit sometimes. However, I’m not going to grumble about that. Instead, I’d like to tell you a funny story to the point.
Once one of our colleagues left the team and joined one company developing software for embedded systems. There is nothing extraordinary about it: in every firm people come and go, all the time. Their choice is determined by bonuses offered, the convenience aspect, and personal preferences. What we find interesting is quite another thing. Our ex-colleague is sincerely worried about the quality of the code he deals with in his new job. And that has resulted in us writing a joint article. You see, once you have figured out what static analysis is all about, you just don’t feel like settling for “simply programming”.