gsview patch

Igor Zivkovic igor at linuxfromscratch.org
Tue Sep 23 15:05:10 PDT 2003


URI: http://www.linuxfromscratch.org/~igor/gsview-4.4-gvx.patch

-- 
Igor Zivkovic
-------------- next part --------------
Submitted By: Igor Zivkovic <igor at linuxfromscratch dot org>
Date: 2003-09-23
Initial Package Version: 4.4
Origin: blfs.book newsgroup, posted by A. Drosos <drososa at otenet dot gr>
Description: Fixes gsview segmentation fault.

--- gsview-4.4/srcunx/gvx.c.orig	2003-02-18 11:08:08.000000000 +0000
+++ gsview-4.4/srcunx/gvx.c	2003-09-23 21:06:13.000000000 +0000
@@ -1857,7 +1857,7 @@
     char lang[MAXSTR];
     char *p;
     memset(lang, 0, sizeof(lang));
-    strncpy(lang, getenv("LANG"), sizeof(lang)-1);
+    strncpy(lang, (getenv("LANG") == 0) ? "C" : getenv("LANG"),sizeof(lang)-1);
     p = strchr(lang, '.');
     if (p && ((strcmp(p, ".UTF-8") == 0) || (strcmp(p, ".utf8") == 0))) {
 	*p = '\0';	/* remove UTF-8 */


More information about the patches mailing list