Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2aa69c6c
Commit
2aa69c6c
authored
Sep 11, 2008
by
Dylan Smith
Committed by
Alexandre Julliard
Sep 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Prevent buffer overrun for tab stops buffer.
parent
fab25802
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
editor.c
dlls/riched20/editor.c
+8
-5
No files found.
dlls/riched20/editor.c
View file @
2aa69c6c
...
...
@@ -843,24 +843,27 @@ void ME_RTFTblAttrHook(RTF_Info *info)
break
;
}
case
rtfCellPos
:
{
int
cellNum
;
if
(
!
info
->
tableDef
)
{
info
->
tableDef
=
ME_MakeTableDef
(
info
->
editor
);
}
if
(
info
->
tableDef
->
numCellsDefined
>=
MAX_TABLE_CELLS
)
cellNum
=
info
->
tableDef
->
numCellsDefined
;
if
(
cellNum
>=
MAX_TABLE_CELLS
)
break
;
info
->
tableDef
->
cells
[
info
->
tableDef
->
numCellsDefined
].
rightBoundary
=
info
->
rtfParam
;
{
info
->
tableDef
->
cells
[
cellNum
].
rightBoundary
=
info
->
rtfParam
;
if
(
cellNum
<
MAX_TAB_STOPS
)
{
/* Tab stops were used to store cell positions before v4.1 but v4.1
* still seems to set the tabstops without using them. */
ME_DisplayItem
*
para
=
ME_GetParagraph
(
info
->
editor
->
pCursors
[
0
].
pRun
);
PARAFORMAT2
*
pFmt
=
para
->
member
.
para
.
pFmt
;
int
cellNum
=
info
->
tableDef
->
numCellsDefined
;
pFmt
->
rgxTabs
[
cellNum
]
&=
~
0x00FFFFFF
;
pFmt
->
rgxTabs
[
cellNum
]
=
0x00FFFFFF
&
info
->
rtfParam
;
}
info
->
tableDef
->
numCellsDefined
++
;
break
;
}
case
rtfRowBordTop
:
info
->
borderType
=
RTFBorderRowTop
;
break
;
...
...
@@ -1045,7 +1048,7 @@ void ME_RTFSpecialCharHook(RTF_Info *info)
ME_InsertTextFromCursor
(
info
->
editor
,
0
,
&
tab
,
1
,
info
->
style
);
tableDef
->
numCellsInserted
++
;
}
pFmt
->
cTabCount
=
tableDef
->
numCellsDefined
;
pFmt
->
cTabCount
=
min
(
tableDef
->
numCellsDefined
,
MAX_TAB_STOPS
)
;
if
(
!
tableDef
->
numCellsDefined
)
pFmt
->
wEffects
&=
~
PFE_TABLE
;
ME_InsertTextFromCursor
(
info
->
editor
,
0
,
&
endl
,
1
,
info
->
style
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment