cwbe coordinatez:
101
792011
1703701
5137344

ABSOLUT
KYBERIA
permissions
you: r,
system: public
net: yes

neurons

stats|by_visit|by_K
source
tiamat
commanders
polls

total descendants::0
total children::0
1 ❤️


show[ 2 | 3] flat


Vid mi práve pastol: The wrong way to determine the size of a buffer

A colleague of mine showed me some code from a back-end program on a web server. Fortunately, the company that wrote this is out of business. Or at least I hope they're out of business!

size = 16384;
while (size && IsBadReadPtr(buffer, size)) {
size--;
}

parádne sú komentáre:
- Wow, just wow. This is wrong in at least three different ways ...
- They could've at least done a binary search... :P
- I should hope they're out of business! It's much more efficient to just start from zero!