Skip to content
Snippets Groups Projects
Commit b4f09c26 authored by George Nachman's avatar George Nachman
Browse files

Fix a stack overrun. constructTextRuns likes to read two characters from its...

Fix a stack overrun. constructTextRuns likes to read two characters from its input line to test for double-width characters.
parent 79a086c6
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -981,6 +981,7 @@ static BOOL hasBecomeActive = NO;
return ([aMenu autorelease]);
}
 
- (void)applicationWillBecomeActive:(NSNotification *)aNotification
{
DLog(@"******** Become Active");
Loading
Loading
Loading
Loading
@@ -1804,7 +1804,13 @@ extern int CGContextGetFontSmoothingStyle(CGContextRef);
 
CRunStorage *storage = [CRunStorage cRunStorageWithCapacity:1];
// Draw the characters.
CRun *run = [self constructTextRuns:&screenChar
screen_char_t temp[2];
temp[0] = screenChar;
memset(temp + 1, 0, sizeof(temp[1]));
if (doubleWidth) {
temp[1].code = DWC_RIGHT;
}
CRun *run = [self constructTextRuns:temp
row:row
selected:NO
indexRange:NSMakeRange(0, 1)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment