Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-21fa
project05b
Commits
10408c0d
Commit
10408c0d
authored
4 years ago
by
Caleb C. Sander
Browse files
Options
Download
Email Patches
Plain Diff
Make index bounds consistent with spec
parent
e2c43114
master
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/index_guesser.c
+2
-2
src/index_guesser.c
src/recover_local_secret.c
+1
-1
src/recover_local_secret.c
with
3 additions
and
3 deletions
+3
-3
src/index_guesser.c
View file @
10408c0d
...
...
@@ -7,10 +7,10 @@
#include "stage2.h"
const
size_t
MIN_CHOICE
=
1
;
const
size_t
MAX_CHOICE
=
256
;
const
size_t
MAX_CHOICE
=
UINT8_MAX
;
static
inline
page_t
*
init_pages
(
void
)
{
return
calloc
(
MAX_CHOICE
,
sizeof
(
page_t
));
return
calloc
(
MAX_CHOICE
+
1
,
sizeof
(
page_t
));
}
static
inline
void
flush_all_pages
(
page_t
*
pages
)
{
...
...
This diff is collapsed.
Click to expand it.
src/recover_local_secret.c
View file @
10408c0d
...
...
@@ -10,7 +10,7 @@ const size_t MAX_CHOICE = 'Z' + 1;
const
size_t
SECRET_LENGTH
=
5
;
static
inline
page_t
*
init_pages
(
void
)
{
return
calloc
(
MAX_CHOICE
,
sizeof
(
page_t
));
return
calloc
(
MAX_CHOICE
+
1
,
sizeof
(
page_t
));
}
static
inline
void
flush_all_pages
(
page_t
*
pages
)
{
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help