author | Michael Krelin <hacker@klever.net> | 2011-01-12 20:41:19 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2011-01-12 20:41:19 (UTC) |
commit | 824440e52ce8ddf1c45487d20d8996d08d0f96b5 (patch) (side-by-side diff) | |
tree | 36c48bea8deeccaccd181c3ecc08b452908c9ee9 | |
parent | c34fa95284928944bdd1b72aba164767257dd46f (diff) | |
download | libopkele-824440e52ce8ddf1c45487d20d8996d08d0f96b5.zip libopkele-824440e52ce8ddf1c45487d20d8996d08d0f96b5.tar.gz libopkele-824440e52ce8ddf1c45487d20d8996d08d0f96b5.tar.bz2 |
fix uninitialized pointer in discovery
it's not the most brilliant idea to pass the uninitialized structure
and dereference the pointer member later on.
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | lib/discovery.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/discovery.cc b/lib/discovery.cc index b4ed3b6..5585e12 100644 --- a/lib/discovery.cc +++ b/lib/discovery.cc @@ -115,17 +115,17 @@ namespace opkele { idiscovery_t idis; idis.xri_identity = false; discover_at(idis,yurl,xmode_html|xmode_xrd|(redirs?0:xmode_noredirs)); if(!xrds_location.empty()) { idis.clear(); discover_at(idis,xrds_location,xmode_xrd); } idis.normalized_id = idis.canonicalized_id = yurl; - service_type_t st; + service_type_t st = { 0, 0 }; for(st.uri=*types;*types;st.uri=*(++types)) queue_endpoints(oi,idis,&st); } string discover(endpoint_discovery_iterator& oi,const string& identity) { string rv; idiscovery_t idis; string::size_type fsc = identity.find_first_not_of(data::_whitespace_chars); |