Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
d20b7807
Commit
d20b7807
authored
2 months ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Fix a few impossible issues "found" by Coverity.
parent
6ca95ad4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/syncterm/bbslist.c
+2
-2
2 additions, 2 deletions
src/syncterm/bbslist.c
src/syncterm/modem.c
+1
-0
1 addition, 0 deletions
src/syncterm/modem.c
src/syncterm/term.c
+9
-2
9 additions, 2 deletions
src/syncterm/term.c
with
12 additions
and
4 deletions
src/syncterm/bbslist.c
+
2
−
2
View file @
d20b7807
...
...
@@ -1094,13 +1094,13 @@ edit_name(char *itemname, struct bbslist **list, str_list_t inifile, bool edit_t
uifc
.
helpbuf
=
"`Directory Entry Name`
\n\n
"
"Enter the name of the entry as it is to appear in the directory."
;
if
(
itemname
)
strcpy
(
tmp
,
itemname
);
str
l
cpy
(
tmp
,
itemname
,
sizeof
(
tmp
)
);
if
(
uifc
.
input
(
WIN_MID
|
WIN_SAV
,
0
,
0
,
"Name"
,
tmp
,
LIST_NAME_MAX
,
K_EDIT
)
==
-
1
)
return
false
;
check_exit
(
false
);
if
(
quitting
)
return
false
;
if
((
edit_to_add
||
stricmp
(
tmp
,
itemname
))
&&
list_name_check
(
list
,
tmp
,
NULL
,
false
))
{
if
((
edit_to_add
||
(
itemname
!=
NULL
&&
stricmp
(
tmp
,
itemname
))
)
&&
list_name_check
(
list
,
tmp
,
NULL
,
false
))
{
uifc
.
helpbuf
=
"`Entry Name Already Exists`
\n\n
"
"An entry with that name already exists in the directory.
\n
"
"Please choose a unique name.
\n
"
;
...
...
This diff is collapsed.
Click to expand it.
src/syncterm/modem.c
+
1
−
0
View file @
d20b7807
...
...
@@ -271,6 +271,7 @@ modem_connect(struct bbslist *bbs)
/* Drain modem output buffer */
while
(
comReadByte
(
com
,
(
uchar
*
)
respbuf
))
;
respbuf
[
0
]
=
0
;
if
(
!
bbs
->
hidepopups
)
uifc
.
pop
(
"Initializing..."
);
...
...
This diff is collapsed.
Click to expand it.
src/syncterm/term.c
+
9
−
2
View file @
d20b7807
...
...
@@ -3088,8 +3088,8 @@ read_jxl(const char *fn)
struct
xpmapping
*
map
=
xpmap
(
fn
,
XPMAP_READ
);
struct
ciolib_pixels
*
pret
=
NULL
;
uint8_t
*
pbuf
=
NULL
;
uintmax_t
width
;
uintmax_t
height
;
uintmax_t
width
=
0
;
uintmax_t
height
=
0
;
if
(
map
==
NULL
)
return
map
;
...
...
@@ -3151,15 +3151,22 @@ read_jxl(const char *fn)
#endif
break
;
case
JXL_DEC_NEED_IMAGE_OUT_BUFFER
:
if
(
width
==
0
||
height
==
0
||
width
>=
0x40000000
||
hewight
>=
0x40000000
)
{
done
=
true
;
break
;
}
if
(
Jxl
.
DecoderImageOutBufferSize
(
dec
,
&
format
,
&
sz
)
!=
JXL_DEC_SUCCESS
)
{
done
=
true
;
break
;
}
// This may break things, but Coverity wants it.
free
(
pbuf
);
pbuf
=
malloc
(
sz
);
if
(
pbuf
==
NULL
)
{
done
=
true
;
break
;
}
freepixels
(
pret
);
pret
=
alloc_ciolib_pixels
(
width
,
height
);
if
(
pret
==
NULL
)
{
done
=
true
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment