[geany/geany] cac111: Prevent reading past start of Scintilla buffer
elextr
git-noreply at xxxxx
Thu Jul 18 02:36:42 UTC 2013
Branch: refs/heads/master
Author: elextr <elextr at gmail.com>
Committer: elextr <elextr at gmail.com>
Date: Thu, 18 Jul 2013 02:36:42 UTC
Commit: cac1115ced305f4828cbc49f08c12d95e05d9e85
https://github.com/geany/geany/commit/cac1115ced305f4828cbc49f08c12d95e05d9e85
Log Message:
-----------
Prevent reading past start of Scintilla buffer
A quick check seemed to show Scintilla does not check the minimum
value is positive, so just check here to be safe and log message
if it fails.
Modified Paths:
--------------
src/editor.c
Modified: src/editor.c
1 files changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -665,6 +665,7 @@ static gboolean match_last_chars(ScintillaObject *sci, gint pos, const gchar *st
gchar *buf;
g_return_val_if_fail(len < 100, FALSE);
+ g_return_val_if_fail(len <= pos, FALSE);
buf = g_alloca(len + 1);
sci_get_text_range(sci, pos - len, pos, buf);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list