From 180cd2fc18a958f0297fdcc2697cf6d500e69a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sun, 12 Oct 2014 20:03:52 +0200 Subject: Fix potential segmentation fault in kcontrol info module --- kcontrol/info/info_openbsd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kcontrol/info/info_openbsd.cpp') diff --git a/kcontrol/info/info_openbsd.cpp b/kcontrol/info/info_openbsd.cpp index 12ec8ee2d..7b484da76 100644 --- a/kcontrol/info/info_openbsd.cpp +++ b/kcontrol/info/info_openbsd.cpp @@ -235,7 +235,7 @@ bool GetInfo_Sound (TQListView *lbox) if ((pos = s.find("at ")) >= 0) { pos += 3; // skip "at " start = end = s.ascii(); - for(; (*end!=':') && (*end!='\n'); end++); + for(; *end && (*end!=':') && (*end!='\n'); end++); len = end - start; dev = (char *) malloc(len + 1); strncpy(dev, start, len); -- cgit v1.2.1