Fix open() not to use va_arg beyond the end of the argument list
Fix open() not to use va_arg beyond the end of the argument list

Using open() in that way produces undefined behaviour.

I discovered this bug after enabling PNaCl's ExpandVarArgs pass.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3338
TEST=fixes crash in two gcc torture tests

Review URL: https://codereview.chromium.org/12594018

git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@11049 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2

sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client