ncal has stack smashing with long month names

Bug #333082 reported by Neskie Manuel
4
Affects Status Importance Assigned to Milestone
bsdmainutils (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: bsdmainutils

shs_CA has long month names and then when cal YYYY is run there is stack smashing.

I fixed the behaviour and attached is a patch, so now it doesn't crash, but it truncates the long month names.

I don't know how to fix it any better or how many locales this would affect.

http://ppa.launchpad.net/ubuntu-l10n-shs/ppa/ubuntu/pool/main/b/bsdmainutils/

*** stack smashing detected ***: cal terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb80126d8]
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x0)[0xb8012690]
cal[0x8049c5d]
[0x8040020]
======= Memory map: ========
08048000-0804c000 r-xp 00000000 08:04 839139 /usr/bin/ncal
0804c000-0804d000 rw-p 00004000 08:04 839139 /usr/bin/ncal
093a9000-093ca000 rw-p 093a9000 00:00 0 [heap]
b7dd6000-b7de3000 r-xp 00000000 08:04 254907 /lib/libgcc_s.so.1
b7de3000-b7de4000 r--p 0000c000 08:04 254907 /lib/libgcc_s.so.1
b7de4000-b7de5000 rw-p 0000d000 08:04 254907 /lib/libgcc_s.so.1
b7df4000-b7df5000 rw-p b7df4000 00:00 0
b7df5000-b7e34000 r--p 00000000 08:04 858482 /usr/lib/locale/shs_CA/LC_CTYPE
b7e34000-b7e35000 r--p 00000000 08:04 858483 /usr/lib/locale/shs_CA/LC_NUMERIC
b7e35000-b7e36000 r--p 00000000 08:04 1129619 /usr/lib/locale/shs_CA/LC_TIME
b7e36000-b7f17000 r--p 00000000 08:04 859858 /usr/lib/locale/shs_CA/LC_COLLATE
b7f17000-b7f18000 rw-p b7f17000 00:00 0
b7f18000-b8070000 r-xp 00000000 08:04 253479 /lib/tls/i686/cmov/libc-2.8.90.so
b8070000-b8072000 r--p 00158000 08:04 253479 /lib/tls/i686/cmov/libc-2.8.90.so
b8072000-b8073000 rw-p 0015a000 08:04 253479 /lib/tls/i686/cmov/libc-2.8.90.so
b8073000-b8076000 rw-p b8073000 00:00 0
b8076000-b8077000 r--p 00000000 08:04 858486 /usr/lib/locale/shs_CA/LC_MONETARY
b8077000-b8078000 r--p 00000000 08:04 858488 /usr/lib/locale/shs_CA/LC_MESSAGES/SYS_LC_MESSAGES
b8078000-b8079000 r--p 00000000 08:04 858489 /usr/lib/locale/shs_CA/LC_PAPER
b8079000-b807a000 r--p 00000000 08:04 858490 /usr/lib/locale/shs_CA/LC_NAME
b807a000-b807b000 r--p 00000000 08:04 1129620 /usr/lib/locale/shs_CA/LC_ADDRESS
b807b000-b807c000 r--p 0000000Aborted

Revision history for this message
Neskie Manuel (neskiem) wrote :
Revision history for this message
Michael Meskes (meskes) wrote :

Should be fixed in all 8* versions, could you re-try?

Changed in bsdmainutils (Ubuntu):
status: New → Confirmed
Michael Meskes (meskes)
Changed in bsdmainutils (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.