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
0e4e1559
Commit
0e4e1559
authored
12 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #10112: validate that interface name is not-NULL before using.
parent
760d191d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gnome/src/config/accountconfigdialog.c
+9
-1
9 additions, 1 deletion
gnome/src/config/accountconfigdialog.c
with
9 additions
and
1 deletion
gnome/src/config/accountconfigdialog.c
+
9
−
1
View file @
0e4e1559
...
...
@@ -533,6 +533,7 @@ static void use_sip_tls_cb(GtkWidget *widget, gpointer data)
static
gchar
*
get_interface_addr_from_name
(
const
gchar
*
const
iface_name
)
{
g_assert
(
iface_name
);
#define UC(b) (((int)b)&0xff)
int
fd
;
...
...
@@ -567,6 +568,10 @@ static void local_interface_changed_cb(GtkWidget * widget UNUSED, gpointer data
{
if
(
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
same_as_local_radio_button
)))
{
gchar
*
local_iface_name
=
gtk_combo_box_text_get_active_text
(
GTK_COMBO_BOX_TEXT
(
local_address_combo
));
if
(
!
local_iface_name
)
{
ERROR
(
"Could not get local interface name"
);
return
;
}
gchar
*
local_iface_addr
=
get_interface_addr_from_name
(
local_iface_name
);
gtk_entry_set_text
(
GTK_ENTRY
(
local_address_entry
),
local_iface_addr
);
...
...
@@ -888,6 +893,10 @@ create_network(const account_t *account)
// Fill the text entry with the ip address of local interface selected
local_address_entry
=
gtk_entry_new
();
gchar
*
local_iface_name
=
gtk_combo_box_text_get_active_text
(
GTK_COMBO_BOX_TEXT
(
local_address_combo
));
if
(
!
local_iface_name
)
{
ERROR
(
"Could not get local interface name"
);
return
frame
;
}
gchar
*
local_iface_addr
=
get_interface_addr_from_name
(
local_iface_name
);
g_free
(
local_iface_name
);
gtk_entry_set_text
(
GTK_ENTRY
(
local_address_entry
),
local_iface_addr
);
...
...
@@ -990,7 +999,6 @@ GtkWidget* create_published_address(const account_t *account)
// This will trigger a signal, and the above two
// widgets need to be instanciated before that.
g_signal_connect
(
local_address_combo
,
"changed"
,
G_CALLBACK
(
local_interface_changed_cb
),
local_address_combo
);
g_signal_connect
(
same_as_local_radio_button
,
"toggled"
,
G_CALLBACK
(
same_as_local_cb
),
same_as_local_radio_button
);
g_signal_connect
(
published_addr_radio_button
,
"toggled"
,
G_CALLBACK
(
set_published_addr_manually_cb
),
published_addr_radio_button
);
...
...
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