Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 55900 - Unknown LC_ALL setting causes segmentation fault
Unknown LC_ALL setting causes segmentation fault
Product: Red Hat Linux
Classification: Retired
Component: mpage (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Bill Nottingham
Depends On:
  Show dependency treegraph
Reported: 2001-11-08 09:49 EST by scheck
Modified: 2014-03-16 22:24 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-11-08 09:49:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description scheck 2001-11-08 09:49:51 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win95; en-US; rv:0.9.5) Gecko/20011011

Description of problem:
Some users (e.g. sybase) have LC_ALL set to default. If this locale is not
available on the system (locale -a) the programm crashes.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. echo "123" | LC_ALL=default mpage
2. Segmentation fault (core dumped)

Actual Results:  [...]
288 80 mp_a_x mul div 378 792 div scale
4 7 translate 280 288 div 784 792 div scale
textfont setfont
Segmentation fault (core dumped)

Expected Results:  no segmentation fault ;-)

%%Pages: 1

Additional info:

mpage251-j-fix.patch causes this bug:

current_locale = setlocale(LC_ALL,"");
if (!strncmp(current_locale,"ja_JP",5)) {

man setlocale:
If locale is NULL, the current locale is only queried, not modified.
The return value is NULL if the request cannot be honored.

=> check for NULL value before calling strncmp!!!
Comment 1 Bill Nottingham 2001-11-08 12:02:03 EST
Fixed in 2.5.1-8.

Note You need to log in before you can comment on or make changes to this bug.