Public bug reported:

Binary package hint: mingw32-runtime

OS: Ubuntu 8.04/AMD64.
Package: 3.13-1

Description:
The snprintf library function incorrectly parses the "%lu" format specifier as 
"unsigned long long" instead of "unsigned long" resulting in incorrect value 
formatting.

Example:
#include <stdio.h>
int main() {
    char buf[256];
    snprintf(buf, 256, "%lu", (size_t)12345678);
    printf(buf);
    return 0;
}

Prints:
9151369040453460302

Instead of:
12345678

Looks like this problem is fixed in the mingw-runtime 3.14.

** Affects: mingw32-runtime (Ubuntu)
     Importance: Undecided
         Status: New

-- 
Inconsistent snprintf format specification parsing
https://bugs.launchpad.net/bugs/242089
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to