* Posts by Ben

2 posts • joined 1 May 2008

Unsafe at any speed: Memcpy() banished in Redmond


They should go one better...

...and pop up a message box asking the user to confirm they want to copy the memory, and if they press OK then they should have to enter a captcha.

Seriously though, how is it supposed to make your code safer if you pass the size you think your destination buffer is? With memcpy, that size is implicitly greater or equal to the copy size and it's the caller's responsibility to make sure this is the case. Putting bounds checking into the copy function is ridiculous if you're responsible for passing the bounds yourself, and it goes against basic good design. I'm surprised they aren't passing the source buffer size too, just to be extra safe.

Also, what happened to the __restrict keyword? It's strangely absent from the memcpy_s function declaration.

Radiohead diss freetards

Thumb Up

Thumbs up for the album product spectrum

I hadn't bought any of their stuff since 'OK Computer', but when I read good reviews of 'In Rainbows' I decided to buy it on CD. I ended up liking it so much that I decided to get the 180g vinyl version as well, which actually sounds a lot better.

I think it's great that we can get such a wide spectrum of price, quality, convenience and sense of ownership for an album these days, and Radiohead have pushed this even further than normal with their deluxe edition versus their honesty box download. It's true that it's unlikely to ever work again as a marketing exercise in quite the same way, but it's a great way of making the music available to more people of different interest levels in the format they want.

I just hope it continues to be viable to produce these heavy vinyl LP releases for those who want them, because they really are amazing.


Biting the hand that feeds IT © 1998–2022