Module Name: src Committed By: roy Date: Mon Mar 1 11:02:32 UTC 2010
Modified Files: src/lib/libterminfo: termcap.c Log Message: Escape , when converting to terminfo. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libterminfo/termcap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libterminfo/termcap.c diff -u src/lib/libterminfo/termcap.c:1.3 src/lib/libterminfo/termcap.c:1.4 --- src/lib/libterminfo/termcap.c:1.3 Fri Feb 26 00:09:00 2010 +++ src/lib/libterminfo/termcap.c Mon Mar 1 11:02:31 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: termcap.c,v 1.3 2010/02/26 00:09:00 roy Exp $ */ +/* $NetBSD: termcap.c,v 1.4 2010/03/01 11:02:31 roy Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: termcap.c,v 1.3 2010/02/26 00:09:00 roy Exp $"); +__RCSID("$NetBSD: termcap.c,v 1.4 2010/03/01 11:02:31 roy Exp $"); #include <assert.h> #include <ctype.h> @@ -243,6 +243,12 @@ if (l + 2 > len) goto elen; if (*val != '%') { + if (*val == ',') { + if (l + 3 > len) + goto elen; + *ip++ = '\\'; + l++; + } *ip++ = *val; l++; continue;