Patchwork [libgfortran] : Fix PR52758, out of bounds access

login
register
mail settings
Submitter Uros Bizjak
Date March 30, 2012, 11:10 a.m.
Message ID <CAFULd4bjsFFoNHmEg-4bU49waSX3_02cKT+-0nYK9J8CPkwUbA@mail.gmail.com>
Download mbox | patch
Permalink /patch/149621/
State New
Headers show

Comments

Uros Bizjak - March 30, 2012, 11:10 a.m.
Hello!

2012-03-30  Uros Bizjak  <ubizjak@gmail.com>

	PR libgfortran/52758
	* intrinsics/chmod.c: Remove out-of-bounds initialization of rwxXstugo.

Bootstrapped and regression tested on x86_64-pc-linux-gnu {,-m32},
committed to mainline SVN as obvious.

Uros.

Patch

Index: intrinsics/chmod.c
===================================================================
--- intrinsics/chmod.c	(revision 185992)
+++ intrinsics/chmod.c	(working copy)
@@ -141,7 +141,6 @@  chmod_func (char *name, char *mode, gfc_charlen_ty
       rwxXstugo[6] = false;
       rwxXstugo[7] = false;
       rwxXstugo[8] = false;
-      rwxXstugo[9] = false;
       part = 0;
       set_mode = -1;
       for (; i < mode_len; i++)