[Asterisk-code-review] geoloc_eprofile.c: Fix setting of loc_src in set_loc_src() (asterisk[19])
George Joseph
asteriskteam at digium.com
Wed Jul 13 13:44:12 CDT 2022
George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/18813 )
Change subject: geoloc_eprofile.c: Fix setting of loc_src in set_loc_src()
......................................................................
geoloc_eprofile.c: Fix setting of loc_src in set_loc_src()
line 196: loc_src = '\0';
should have been
line 196: *loc_src = '\0';
The issue was caught by the gcc optimizer complaining that
loc_src had a zero length because the pointer itself was being
set to NULL instead of the _contents_ of the pointer being set
to the NULL terminator.
ASTERISK-30138
Reported-by: Sean Bright
Change-Id: Id247be113cc8510f043ca053d5b4f5f3d32acd29
---
M res/res_geolocation/geoloc_eprofile.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/13/18813/1
diff --git a/res/res_geolocation/geoloc_eprofile.c b/res/res_geolocation/geoloc_eprofile.c
index 64244f4..af0e89c 100644
--- a/res/res_geolocation/geoloc_eprofile.c
+++ b/res/res_geolocation/geoloc_eprofile.c
@@ -193,7 +193,7 @@
loc_src = strchr(local_uri, ';');
if (loc_src) {
- loc_src = '\0';
+ *loc_src = '\0';
loc_src++;
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18813
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 19
Gerrit-Change-Id: Id247be113cc8510f043ca053d5b4f5f3d32acd29
Gerrit-Change-Number: 18813
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220713/d409b153/attachment-0001.html>
More information about the asterisk-code-review
mailing list