Wednesday, August 24, 2011

Stupidest C Bug Ever?

Can you spot the bug in this code fragment?
if (code == 200) {     // Downloading whole file
    /* Write new file (plus allow reading once we finish) */
    // FIXME Win32 native version fails here because Microsoft's version of tmpfile() creates the file in C:\
    g = fname ? fopen(fname, "w+") : tmpfile();
}
Explanation here...

AES Vulnerability...

Not bad enough to get worried about – yet – but something to keep an eye on...

Crazy Russians...

Apparently they want to build a tunnel across the Bering Straits, something like 64 miles long.  It would carry trains, electricity, and communications.  I can't figure out if it's serious or just grandstanding on someone's part.  Or maybe a little too much vodka...

Earthquake!

My folks live about 7 miles from the epicenter of yesterday's earthquake in Virginia.  They're fine, and their house is fine.  But they didn't like it very much!

There's a detailed USGS report, location maps, a science article, and realtime maps (where the picture at right came from).  In this morning's news, I read of some damage in Culpepper and in Washington, D.C., but all-in-all it looks pretty minor.

I sense a new-found level of respect from my East Coast colleagues, especially when it dawns on them that the Virginia quake was quite small compared to some we've had out here...