HNHacker News
TopNewBestAskShowJobs

cremno

2,647 karma · joined March 24, 2012

submissionscomments
cremno··on C Puzzles
Nice one but:

>It's not standards-compliant

Why? It's just a VLA.

cremno··on Haha, Microsoft’s Windows 10 Upgrade Path for Pirates Is Confusing as Shit
I like Paul Thurrott's explanation and not only because of the unambiguous headline:

https://www.thurrott.com/windows/windows-10/4257/guys-seriou...

cremno··on MySQL Bug #11472: Triggers not executed following foreign key updates/deletes
In a few days #20786 will have its 9th birthday.

https://www.youtube.com/watch?v=oAiVsbXVP6k

https://bugs.mysql.com/bug.php?id=20786

cremno··on Boffins reveal password-killer 0days for iOS and OS X
That would also explain the blitzkrieg part.
cremno··on The Death of the Von Neumann Architecture
>Apple and Microsoft are showing every indication that within the near future this direction may well apply to desktops too. The restrictive ‘store’ APIs pushed by these platform holders seem to relish in preventing the execution of unapproved code.

Not really. Windows 10 apparently allows universal Windows apps to call VirtualAlloc() and VirtualProtect().

http://blogs.msdn.com/b/chuckw/archive/2012/09/17/dual-use-c...

cremno··on C++ in the modern world
>though I don't have a citeable source on hand for that.

https://isocpp.org/std/status

cremno··on Unix is not an acceptable Unix
>You can write PS cmdlets in C/C++, there is an SDK.

Are you sure? AFAIK you have to use C++/CLI which isn't C++ and the official examples are either C# or VB.NET: https://code.msdn.microsoft.com/site/search?f[0].Type=Topic&...

cremno··on Mongo BSON Injection: Ruby Regexps Strike Again
Ruby inherited this behavior from Emacs (matz' favorite text editor) among other things.
cremno··on How US students get a university degree for free in Germany
MINT (not MIND) is relatively the same as STEM.
cremno··on Strncpy() is not a “safer” strcpy()
A similar article: https://randomascii.wordpress.com/2013/04/03/stop-using-strn...

This article is also on GH (including some changes): https://github.com/Keith-S-Thompson/the-flat-trantor-society...

cremno··on Common x86 Calling Conventions
A wild __vectorcall appeared!

http://blogs.msdn.com/b/vcblog/archive/2013/07/12/introducin...

https://msdn.microsoft.com/en-us/library/dn375768.aspx

cremno··on Understanding the bin, sbin, usr/bin, usr/sbin Split [pdf]
>I’m still waiting for /opt/local to show up...

Well, he doesn't have to wait anymore:

https://trac.macports.org/wiki/FAQ#defaultprefix

>Why is /opt/local the default install location for MacPorts?

cremno··on Linux futex_wait() bug – update to latest patches now
GCC has a diagnostic for that (-Wswitch-default) but see mirashii's comment.
cremno··on Show HN: Twenty
That game also has a good soundtrack. Especially Stage A (Ryoukai Senshi Exchanger): https://www.youtube.com/watch?v=bAxgarEVSc0
cremno··on EarthBound’s Copy Protection
This summer a fan-made Earthbound (well, Mother) game called Mother 4 will be released for free.

http://www.mother4game.com

cremno··on C++11/14/17 Features in VS 2015 RC
Let's look at the non-conditional C11 major changes:

>additional floating-point characteristic macros (<float.h>)

VS2015 RC.

>querying and specifying alignment of objects (<stdalign.h>, <stdlib.h>)

Missing but the functionality is available as extensions.

>Unicode characters and strings (<uchar.h>) (originally specified in ISO/IEC TR 19769:2004)

VS2015 RC.

>type-generic expressions

Missing. (Use C++ instead. trollface.dds)

>static assertions

Missing but (incorrectly) static_assert can be used instead of _Static_assert.

>anonymous structures and unions

Partially or maybe even completely. I would have to check but for trivial usage I'd consider it to be complete.

>no-return functions

Missing but __declspec(noreturn) can be used instead.

>support for opening files for exclusive access

Missing but _fsopen() / _wfsopen() and _SH_DENYRW can be used instead.

>removed the gets function (<stdio.h>)

VS2015 RC.

>added the aligned_alloc, at_quick_exit, and quick_exit functions (<stdlib.h>)

Partially as aligned_alloc() is missing.

cremno··on What will C++17 be?
Somewhere in 2017.
cremno··on GCC 5.1 released
Sadly clang (the origin of those built-in functions) doesn't implement the type-generic ones and GCC doesn't implement __has_builtin yet.
cremno··on Remote Kernel Code Execution Via HTTP Request In IIS On Windows
From the exploit code:

    memset(&serv_addr, '0', sizeof(serv_addr));
That doesn't seem to be correct. The digit character 0 is not the same as the null character ('\0'). Just write 0 or use `struct sockaddr_in serv_addr = { 0 };`.
cremno··on Finding bugs in SQLite, the easy way
I don't think so. There are some other mails (like https://marc.info/?l=openbsd-misc&m=142563704303304&w=2), but I also think now I should've used a different quote.
cremno··on Finding bugs in SQLite, the easy way
Theo de Raadt, one month ago (not the only and first mail in this (derailed) thread though):

>A review of libsqlite source code will demonstrate that it is written

>using many old practices of coping with "older systems". Many of the

>same techniques that caused unneccessary risk in OpenSSL.

https://marc.info/?l=openbsd-misc&m=142566734914439&w=2

cremno··on D-Link patch doesn’t address all bugs listed in their own security advisory
I agree, but I don't think mentioning such an exception is a good idea. That's basically the same reason why gets() is part of ISO C90 and C99. Just call snprintf() even in such cases and forget about sprintf().

From http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10..., PDF page 163:

>The Committee decided that gets was useful and convenient in those special circumstances when the programmer does have adequate control over the input, and as longstanding existing practice, it needed a standard specification.

cremno··on The Maker of the Trollface Meme
>Submitted on September 19, 2008

But that doesn't matter that much since it was originally posted on 4chan and not DA.

cremno··on The Maker of the Trollface Meme
You're thinking about a different comic: http://www.ebaumsworld.com/pictures/view/80430987/

The original can be found on the linked site, but it's also on DA: http://whynne.deviantart.com/art/Comic-Trolls-98357844

From the description:

>It's trollface, not coolface, but call it what you like.

cremno··on Linux 4.0
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux....

https://plus.google.com/+LinusTorvalds/posts/TvigQqA9m3w

cremno··on Linux 4.0
>Windows Threshold

That was just a codename. Vista and XP (and ME?) are actual examples.

cremno··on Linux 4.0
The announcement: https://lkml.org/lkml/2015/4/12/178
cremno··on Hidden backdoor API to root privileges in Apple OS X
Windows 8 comes with a basic PDF reader: http://windows.microsoft.com/en-us/windows-8/reader-app-faq
cremno··on Clojures in C
That isn't strange. From the linked page:

>But this technique works only so long as the containing function (hack, in this example) does not exit.

cremno··on BYTE Magazine: The C Language (1983)
Not really true (this is about C's predecessor B):

Thompson went a step further by inventing the ++ and -- operators, which increment or decrement; their prefix or postfix position determines whether the alteration occurs before or after noting the value of the operand. They were not in the earliest versions of B, but appeared along the way. People often guess that they were created to use the auto-increment and auto-decrement address modes provided by the DEC PDP-11 on which C and Unix first became popular. This is historically impossible, since there was no PDP-11 when B was developed. The PDP-7, however, did have a few `auto-increment' memory cells, with the property that an indirect memory reference through them incremented the cell. This feature probably suggested such operators to Thompson; the generalization to make them both prefix and postfix was his own. Indeed, the auto-increment cells were not used directly in implementation of the operators, and a stronger motivation for the innovation was probably his observation that the translation of ++x was smaller than that of x=x+1.

http://cm.bell-labs.com/cm/cs/who/dmr/chist.html

← PreviousPage 4 of 7Next →