Unit test in C++ with Google Test

I had the extreme need of building a C/C++ CGI this weekend and, why not, i wanted it fully covered by tests.

As always, for any need, Google has a solution and, in this case, for my testing needs, Google had Google Test (gtest), a pretty easy to use library that allows you to write test cases (made of assertions) and compile/run them to check the project’s integrity.

Continue reading “Unit test in C++ with Google Test”

What is Buffer Overflow vulnerability and how do we exploit it.

Buffer overflow is probably the most feared security hole in software since it’s not just a development issue (it is) but also a language standard library “error”. This makes buffer overflow vulnerabilities hard to spot and fix and ridicously powerfull.
But, what is a buffer overflow vulnerabilty and how do we exploit it?Imágenes integradas 1

Continue reading “What is Buffer Overflow vulnerability and how do we exploit it.”

Define values in compilation time with GCC

 

Sometimes your code need some additional / environmental information to compile, like version number, platform data, date, etc.

Most compilers let you “define” values in compile time, in this article we gonna cover how to do it in GCC, G++ and Clang.

Continue reading “Define values in compilation time with GCC”

Design a site like this with WordPress.com
Get started