Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1093)

Issue 272240043: Fix possible buffer overflow in replace_wcsstr

Can't Edit
Can't Publish+Mail
Start Review
Created:
8 years, 6 months ago by zhaoqin
Modified:
8 years, 6 months ago
Reviewers:
bruening
CC:
drmemory-devs_googlegroups.com
Visibility:
Public.

Description

Commit log for first patchset: --------------- Fix possible buffer overflow in replace_wcsstr - only backtrack if n > needle - restore hs back to matching start position as we have hs++ at end of the loop ---------------

Patch Set 1 #

Patch Set 2 : add test case #

Patch Set 3 : Committed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M drmemory/replace.c View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/app_suite/strmem_tests.cpp View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5
zhaoqin
8 years, 6 months ago (2015-10-28 20:49:13 UTC) #1
bruening
Please add a test case to the existing set of wcsstr tests
8 years, 6 months ago (2015-10-28 20:50:00 UTC) #2
zhaoqin
Commit log for latest patchset: --------------- i#1718 fix possible buffer overflow in replace_wcsstr: backtrack only ...
8 years, 6 months ago (2015-10-28 21:51:55 UTC) #3
bruening
LGTM
8 years, 6 months ago (2015-10-28 22:00:18 UTC) #4
zhaoqin
8 years, 6 months ago (2015-10-28 22:03:52 UTC) #5
Committed as
https://github.com/DynamoRIO/drmemory/commit/ebbb1d4de17cddd099d2d459b68b0779...

Final commit log: 
---------------
i#1718 fix possible buffer overflow in replace_wcsstr: backtrack only if n >
needle

- only backtrack if n > needle
- add test case

Review-URL: https://codereview.appspot.com/272240043
---------------
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b