What NOT to do when coding 10-21-2017, 10:09 AM
#1
So, take a look at this union....it makes no sense...on top of that, the author of this code is doing some weird shit with the ptr field... when i told him that this is a massive issue, and causes a buffer overflow no matter how he uses it, he didn't get it and kept describing that it's "one way to implement std:
tring"
Have a look for yourselves:
![[Image: guArI8z.png]](https://i.imgur.com/guArI8z.png)
Notice how my second string has overflowed and is now in the .text segment, pretty close to the executable code for the function main? Pretty cool huh?
He still doesn't understand that this is a bug, and a pretty fucking awesome security vulnerability if you as me, I wish Apple wrote code like this
![Confused Confused](https://sinister.ly/images/smilies/set/confused.png)
Have a look for yourselves:
![[Image: guArI8z.png]](https://i.imgur.com/guArI8z.png)
Notice how my second string has overflowed and is now in the .text segment, pretty close to the executable code for the function main? Pretty cool huh?
He still doesn't understand that this is a bug, and a pretty fucking awesome security vulnerability if you as me, I wish Apple wrote code like this
![Tongue Tongue](https://sinister.ly/images/smilies/set/tongue.png)