File CVE-2018-12085.patch of Package liblouis.8510

From dbfa58bb128cae86729578ac596056b3385817ef Mon Sep 17 00:00:00 2001
From: Christian Egli <christian.egli@sbs.ch>
Date: Wed, 6 Jun 2018 16:41:53 +0200
Subject: [PATCH] Check index before writing to result->chars

Fixes #595

Rebased by Mike Gorse <mgorse@suse.com>
---
diff -urp liblouis-3.3.0.orig/liblouis/compileTranslationTable.c liblouis-3.3.0/liblouis/compileTranslationTable.c
--- liblouis-3.3.0.orig/liblouis/compileTranslationTable.c	2018-08-08 11:02:46.334146579 -0500
+++ liblouis-3.3.0/liblouis/compileTranslationTable.c	2018-08-08 13:51:00.691306671 -0500
@@ -1422,12 +1422,12 @@ parseChars (FileInfo * nested,
 		}
 	      in++;
 	    }
-	  result->chars[out++] = (widechar) ch;
 	  if (out >= MAXSTRING)
 	    {
 	      result->length = out;
 	      return 1;
 	    }
+	  result->chars[out++] = (widechar) ch;
 	  continue;
 	}
       lastOutSize = out;
Only in liblouis-3.3.0: NEWS.orig
Only in liblouis-3.3.0: NEWS.rej
openSUSE Build Service is sponsored by