1,260 karma · joined November 2, 2009
In other words, please answer each question in the context of a C compiler whose implementation-defined characteristics include two's complement signed integers, 8-bit chars, 16-bit shorts, and 32-bit ints. The long type is 32 bits on x86, but 64 bits on x86-64 (this is LP64, for those who care about such things).
[1] http://www.reddit.com/r/programming/comments/tionj/linus_tor...
That's, of course, assuming that such an announcement is made in the first place. Last year the timthumb bug was being exploited and not all theme download sites bothered to alert the users that the themes were vulnerable.
http://madebyevan.com/webgl-water/ might be more interesting then.
Klarna also requires your Social Security Number, in those countries which use it, as well as other information: http://integration.klarna.com/en/testing/test-persons .
I mentioned C+++ Templates: The Complete Guide - it demonstrates a similar template (15.2.4) to add two values, and even with simple addition it points out a flaw similar to this one (and admittedly more likely to come up in the real world) - determining the return type for, say, int + char. Their solution is a traits class with a specialization for each pair of types. Sounds complicated, but then again, so is writing a template function to perform simple multiplication.
template <class ttype>
ttype multiply(ttype a, ttype b)
{
return a * b;
}
int * int doesn't always fit in an int. C++ Templates: The Definitive Guide suggests using a traits class to solve problems like this. Templates are a complex subject in general, and I wouldn't recommend using them without having read the aforementioned book.> I think PHP support on Windows is as good as on any other OS.
I have seen several things fail in that environment - escaping shell commands and arguments is problematic, invoking external executables is only reliable when full path is used [1], realpath() (used to, at least) chokes on / as a directory separator... Autoloading classes based on classname => filename can produce funny results. File uploads can work differently (case sensitive filenames - foo.jpg and foo.JPG can coexist in Linux, but not in Windows).
On the other hand, there are things like the new MSSQL PDO driver that only exist in the Windows world.
---
[1] Windows 2003 Server was running our app, which invoked Imagick similar to `convert $input.jpg $output.jpg`.
Worked just great for half a year.
Deployed to a second machine, Windows 2008 Server.
Command execution fails silently.
Change %PATH% to be identical to the old server's one.
Restart.
Still fails.
Compare phpinfo().
$_ENV['PATH'] in new server doesn't match %PATH% (it appears to be re-sorted with windows folders first), $_ENV['PATH'] in old server matches %PATH%.
Messing around with new %PATH% changes nothing, new server keeps giving PHP the silently-reordered %PATH%.
Nothing helps, short of specifying full path to `convert`.
A very fun thing to debug.
var f = []['concat']; // Array.prototype.concat
f()[0]; // returns the global window
The rest of the script appears to mostly be old tricks - convert stuff to strings, combine characters in strings to compose expressions, pass them to eval... var f = []['concat']; (f + '');
// Chrome
"function concat() { [native code] }"
// IE (9)
"
function concat() {
[native code]
}
"
This script tries to extract letters from that string representation, which fails if the string is different. (This is also used as an anti-debugging measure in some JS malware, to prevent researchers from replacing document.write with alert() or similar.)2. Iterating over the window object doesn't work the same way in IE: http://blogs.msdn.com/b/ericlippert/archive/2005/05/04/41468...
In particular, this script tries to extract strings 'sessionStorage', 'getComputedStyle', 'onchange' by iterating over the window object, all of whom fail in IE.
[1] http://www.hexblog.com/?p=21 - The author of IDA Pro disassembler wrote a hotfix for the WMF vulnerability in Windows about a week before MS released a fix. From what I've heard, his site completely tanked due to all the downloads.
I've gotten into the habit of auto'ing most variables nowadays, it's quite convenient not having to type
LongTemplateName<ClassName> variable = LongTemplateName<ClassName>::StaticCollection.Find(something);----
Small clarification: I shared some info on the internal workings of Command&Conquer in the comments of the last post. The author of this post took that to mean that I was one of the developers. That's not true - I'm just a bored coder with a disassembler and (not so much lately) free time on my hands. Some friends of mine and I reverse engineered large amounts of code in those games to add new functionality or fix bugs, which there were plenty of...
R. A. Heinlein, "Life-Line", 1939
The cheaters also found a small loophole in the hashing, because only specific fields are hashed and not entire objects, one important field was missed that gave cheaters an unfair advantage of seeing the current targets of their opponents' units. It is easy enough to fix when you know about it, fortunately.
It is possible they recompiled it with the new license and the installer project was configured to carry all resources it found in specific folders, while the executable was configured to only include specific resource files... I used Extract instead of Install because my system disk is already truecrypt'ed, but if you can provide the files the installation creates, I could compare those too.
Edit: However, the installer binaries' sizes differ by 113280 bytes, while the extracted files' size totals differ only by 925 bytes.
Edit 2: the majority of the size difference is in the .rsrc section, the newer version contains several additional binary resources, some of which appear to be boot loaders. And the text resources are different... is it possible the installed versions are different and the extracted ones are not?