summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-06 20:59:41 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-06 20:59:41 +0800
commite21389d450cdf62bfed6375684eedbbc3505bac6 (patch)
tree9b5c4dd2a5dcc624d166551cfc81c3ddd036bdc1
parent91c048f66726bca22fe56ad765d0c5c6e7974f00 (diff)
downloadpttbbs-e21389d450cdf62bfed6375684eedbbc3505bac6.tar
pttbbs-e21389d450cdf62bfed6375684eedbbc3505bac6.tar.gz
pttbbs-e21389d450cdf62bfed6375684eedbbc3505bac6.tar.bz2
pttbbs-e21389d450cdf62bfed6375684eedbbc3505bac6.tar.lz
pttbbs-e21389d450cdf62bfed6375684eedbbc3505bac6.tar.xz
pttbbs-e21389d450cdf62bfed6375684eedbbc3505bac6.tar.zst
pttbbs-e21389d450cdf62bfed6375684eedbbc3505bac6.zip
- pmore: fixed partial matching for named frames
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3645 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/pmore.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mbbsd/pmore.c b/mbbsd/pmore.c
index 45cd83c7..947c4486 100644
--- a/mbbsd/pmore.c
+++ b/mbbsd/pmore.c
@@ -2876,6 +2876,11 @@ mf_movieGotoNamedFrame(const unsigned char *name, const unsigned char *end)
if (mf.end - p < sz)
continue;
+ // check: target of p must end.
+ if (mf.end -p > sz &&
+ isalnum(*(p+sz)))
+ continue;
+
if (memcmp(p, name, sz) == 0)
return 1;