The problem lies in the snprintf() calls within the loop [1][2][3]:

-----

(void)snprintf(k[i], sizeof(k), "key%d", i);

-----


Variable k is defined as:

-----

char k[15][16]

-----

sizeof(k) is hence 15*16 = 240. This works for snprintf(k[0]...) only.
For larger indices, a buffer overflow will result.

[1] 
https://git.launchpad.net/ubuntu/+source/wiredtiger/tree/examples/c/ex_async.c#n146
[2] 
https://git.launchpad.net/ubuntu/+source/wiredtiger/tree/examples/c/ex_async.c#n151
[3] 
https://git.launchpad.net/ubuntu/+source/wiredtiger/tree/examples/c/ex_async.c#n191

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2056102

Title:
  wiredtiger fails to build from source in noble due to the test
  coredump

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/wiredtiger/+bug/2056102/+subscriptions


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

Reply via email to