Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
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
savoirfairelinux
jami-daemon
Commits
a533feaf
Commit
a533feaf
authored
14 years ago
by
Brendan Smith
Committed by
Emmanuel Milou
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[#4952] Patches for possible buffer overflows
Signed-off-by:
Emmanuel Milou
<
emmanuel.milou@savoirfairelinux.com
>
parent
22260ae7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sflphone-client-gnome/src/config/assistant.c
+3
-3
3 additions, 3 deletions
sflphone-client-gnome/src/config/assistant.c
sflphone-common/src/main.cpp
+6
-4
6 additions, 4 deletions
sflphone-common/src/main.cpp
with
9 additions
and
7 deletions
sflphone-client-gnome/src/config/assistant.c
+
3
−
3
View file @
a533feaf
...
...
@@ -90,15 +90,15 @@ void getMessageSummary (char * message , const gchar * alias, const gchar * serv
strcat
(
message
,
"
\n\n
"
);
strcat
(
message
,
_
(
"Alias"
));
sprintf
(
var
,
" : %s
\n
"
,
alias
);
s
n
printf
(
var
,
sizeof
(
var
),
" : %s
\n
"
,
alias
);
strcat
(
message
,
var
);
strcat
(
message
,
_
(
"Server"
));
sprintf
(
var
,
" : %s
\n
"
,
server
);
s
n
printf
(
var
,
sizeof
(
var
),
" : %s
\n
"
,
server
);
strcat
(
message
,
var
);
strcat
(
message
,
_
(
"Username"
));
sprintf
(
var
,
" : %s
\n
"
,
username
);
s
n
printf
(
var
,
sizeof
(
var
),
" : %s
\n
"
,
username
);
strcat
(
message
,
var
);
strcat
(
message
,
_
(
"Security: "
));
...
...
This diff is collapsed.
Click to expand it.
sflphone-common/src/main.cpp
+
6
−
4
View file @
a533feaf
...
...
@@ -106,7 +106,7 @@ main (int argc, char **argv)
unsigned
int
iPid
=
getpid
();
char
cPid
[
64
],
cOldPid
[
64
];
sprintf
(
cPid
,
"%d"
,
iPid
);
s
n
printf
(
cPid
,
sizeof
(
cPid
),
"%d"
,
iPid
);
std
::
string
xdg_cache
,
xdg_env
,
path
;
xdg_cache
=
std
::
string
(
HOMEDIR
)
+
DIR_SEPARATOR_STR
+
".cache/"
;
...
...
@@ -118,11 +118,13 @@ main (int argc, char **argv)
}
else
path
=
xdg_cache
;
sprintf
(
sfldir
,
"%s"
,
path
.
c_str
());
// Use safe sprintf (Contribution #4952, Brendan Smith)
snprintf
(
sfldir
,
sizeof
(
sfldir
),
"%s"
,
path
.
c_str
());
path
=
path
+
"sflphone"
;
sprintf
(
homepid
,
"%s/%s"
,
path
.
c_str
(),
PIDFILE
);
// Use safe sprintf (Contribution #4952, Brendan Smith)
snprintf
(
homepid
,
sizeof
(
homepid
),
"%s/%s"
,
path
.
c_str
(),
PIDFILE
);
if
(
(
fp
=
fopen
(
homepid
,
"r"
))
==
NULL
)
{
// Check if $XDG_CACHE_HOME directory exists or not.
...
...
@@ -137,7 +139,7 @@ main (int argc, char **argv)
}
// Then create the sflphone directory inside the $XDG_CACHE_HOME dir
sprintf
(
sfldir
,
"%s"
,
path
.
c_str
());
s
n
printf
(
sfldir
,
sizeof
(
sfldir
),
"%s"
,
path
.
c_str
());
if
(
(
dir
=
opendir
(
sfldir
))
==
NULL
)
{
//Create it
...
...
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