Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix segfault invalid host #11

Closed
wants to merge 1 commit into from

2 participants

@agimenez

Hi greg,

Please pull a fix to avoid a segfault when specifying an invalid host name via commandline.

@agimenez agimenez Fix a segfault when specifying an invalid host.
If the --host argument did not contain a valid hostname to contact to, a
segmentation fault was raised because the return value from oauth_http_post and
oauth_http_get was not being properly checked.
03e07fd
@gregkh
Owner

Pulled and pushed out, thanks.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 3, 2011
  1. @agimenez

    Fix a segfault when specifying an invalid host.

    agimenez authored
    If the --host argument did not contain a valid hostname to contact to, a
    segmentation fault was raised because the return value from oauth_http_post and
    oauth_http_get was not being properly checked.
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 0 deletions.
  1. +5 −0 bti.c
View
5 bti.c
@@ -724,6 +724,11 @@ static int send_request(struct session *session)
free(req_url);
}
+ if (!reply) {
+ fprintf(stderr, "Error retrieving from URL (%s)\n", endpoint);
+ return 1;
+ }
+
if ((session->action != ACTION_UPDATE) &&
(session->action != ACTION_RETWEET))
parse_timeline(reply, session);
Something went wrong with that request. Please try again.