We can turn any process into a server in an incredibly simple manner using the powerful networking utility netcat. For example, we can make a shell a server: Now let’s try to understand the above-highlighted line. Noting that a pipeline runs in parallel, cat fifo therefore outputs the content of fifo only when nc -l …
Monthly Archives: November 2022
Zero Pointer Dereference, Huh?
Consider the following code: So, do you think the above two highlighted lines will crash the program? Well, at least to me, it will, since they’re dereferencing null pointers. Take, int b = (int) &((struct s *)0)->m2;, for example, we first dereference the zero pointer to get the member m2, and then obtain its address. …