Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Jul 2000 19:40:23 +0300 (EEST)
From:      klim@unique.kiev.ua
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/19950: gencat can't parse octal numbers
Message-ID:  <200007151640.TAA00765@runner.unique.kiev.ua>

next in thread | raw e-mail | index | archive | help

>Number:         19950
>Category:       bin
>Synopsis:       gencat can't parse octal numbers
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 15 09:50:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Alexey Klimov
>Release:        FreeBSD 3.0-STABLE/4.0-STABLE/5.0-CURRENT i386
>Organization:
Joint Venture "Unique"
>Environment:

	FreeBSD runner.unique.kiev.ua 3.3-RELEASE FreeBSD 3.3-RELEASE #7: Thu Jun 22 22:02:16 EEST 2000     root@runner.unique.kiev.ua:/usr/src/sys/compile/UNIQUE  i386
	FreeBSD runner.unique.kiev.ua  4.0-STABLE FreeBSD 4.0-STABLE #0: Wed Jul 12 23:54:33 EEST 2000     root@runner.unique.kiev.ua:/usr/src/sys/compile/UNIQUE  i386
	FreeBSD runner.unique.kiev.ua 5.0-20000625-CURRENT FreeBSD 5.0-20000625-CURRENT #0: Wed Jul  5 20:06:46 EEST 2000     root@runner.unique.kiev.ua:/usr/src/sys/compile/GENERIC  i386

>Description:

	Parsing NLS messages gencat skips octal characters (\xxx).
	Because it doesn't increase output string pointer after
	converting octal number to character.

>How-To-Repeat:

	# cat test.msg
	$
	$	"\123\164\162\151\156\147\040\062" == "String 2"
	$
	$set 1
	@quote "
	1 "String 1"
	2 "\123\164\162\151\156\147\040\062"
	3 "String 3"
	# gencat test.cat test.msg
	# strings -o test.cat
	      0 *nazgul*
	    110 "String 1"
	    126 "String 3"

>Fix:

	--- genlib.c.orig	Sun Aug  2 18:18:44 1998
	+++ genlib.c	Fri Jul 14 11:32:43 2000
	@@ -265,6 +265,7 @@
	 			*tptr += (*cptr - '0');
	 			++cptr;
	 		    }
	+		    ++tptr;
	 		} else {
	 		    warning(cptr, "unrecognized escape sequence");
	 		}


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007151640.TAA00765>