Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/lib/libsa use new function to avoid array overflow



details:   https://anonhg.NetBSD.org/src/rev/067930062636
branches:  trunk
changeset: 790769:067930062636
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Oct 20 17:15:42 2013 +0000

description:
use new function to avoid array overflow

diffstat:

 sys/lib/libsa/dosfs.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 60904b73599b -r 067930062636 sys/lib/libsa/dosfs.c
--- a/sys/lib/libsa/dosfs.c     Sun Oct 20 17:14:48 2013 +0000
+++ b/sys/lib/libsa/dosfs.c     Sun Oct 20 17:15:42 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dosfs.c,v 1.18 2011/12/25 06:09:08 tsutsui Exp $       */
+/*     $NetBSD: dosfs.c,v 1.19 2013/10/20 17:15:42 christos Exp $      */
 
 /*
  * Copyright (c) 1996, 1998 Robert Nordier
@@ -570,7 +570,7 @@
                                                        for (x = 0, i = 0;
                                                             i < 11; i++)
                                                                x = ((((x & 1) << 7) | (x >> 1)) +
-                                                                   dir[ent].de.deName[i]) & 0xff;
+                                                                   msdos_dirchar(&dir[ent].de,i)) & 0xff;
                                                        ok = chk == x &&
                                                            !strcasecmp(name, (const char *)lfn);
                                                }



Home | Main Index | Thread Index | Old Index