Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
8925ddee
Commit
8925ddee
authored
Apr 21, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
big integer from buffer bug
parent
84824631
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
11 deletions
+7
-11
DesktopEditor/common/BigInteger.h
DesktopEditor/common/BigInteger.h
+3
-11
DesktopEditor/xmlsec/test/windows_list_serts/main.cpp
DesktopEditor/xmlsec/test/windows_list_serts/main.cpp
+4
-0
No files found.
DesktopEditor/common/BigInteger.h
View file @
8925ddee
...
...
@@ -55,18 +55,10 @@ public:
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
int
val
=
0
;
char
_c
=
data
[
i
];
if
(
_c
>=
'0'
&&
_c
<=
'9'
)
val
=
_c
-
'0'
;
else
if
(
_c
>=
'A'
&&
_c
<=
'F'
)
val
=
10
+
_c
-
'A'
;
else
if
(
_c
>=
'a'
&&
_c
<=
'f'
)
val
=
10
+
_c
-
'a'
;
CBigInteger
tmp
((
int
)
data
[
i
]);
CBigInteger
tmp
(
val
);
for
(
int
j
=
size
-
1
-
i
;
j
>
0
;
--
j
)
tmp
*=
10
;
tmp
*=
256
;
*
this
+=
tmp
;
}
...
...
DesktopEditor/xmlsec/test/windows_list_serts/main.cpp
View file @
8925ddee
...
...
@@ -39,6 +39,10 @@ void main(void)
CBigInteger
val3
=
int1
*
int2
;
CBigInteger
int3
(
"66A1F302407647974D18D489855371B5"
,
16
);
unsigned
char
buffer
[
16
]
=
{
0x66
,
0xA1
,
0xF3
,
0x02
,
0x40
,
0x76
,
0x47
,
0x97
,
0x4D
,
0x18
,
0xD4
,
0x89
,
0x85
,
0x53
,
0x71
,
0xB5
};
CBigInteger
val4
(
buffer
,
16
);
std
::
string
sValue
=
int3
.
ToString
();
}
...
...
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