From: <sid...@us...> - 2010-08-05 03:36:30
|
Revision: 380 http://libyahoo2.svn.sourceforge.net/libyahoo2/?rev=380&view=rev Author: siddheshp Date: 2010-08-05 03:36:23 +0000 (Thu, 05 Aug 2010) Log Message: ----------- NULL pointer dereference fixes by Wilmer van der Gaast Modified Paths: -------------- trunk/libyahoo2/src/libyahoo2.c Modified: trunk/libyahoo2/src/libyahoo2.c =================================================================== --- trunk/libyahoo2/src/libyahoo2.c 2010-07-27 02:48:56 UTC (rev 379) +++ trunk/libyahoo2/src/libyahoo2.c 2010-08-05 03:36:23 UTC (rev 380) @@ -4935,6 +4935,9 @@ static void yahoo_remove_active_transfer(struct send_file_data *sfd) { + if (sfd == NULL) + return; + active_file_transfers = y_list_remove(active_file_transfers, sfd); free(sfd->id); free(sfd->who); @@ -5095,7 +5098,7 @@ else { YAHOO_CALLBACK(ext_yahoo_file_transfer_done) (yid->yd->client_id, YAHOO_FILE_TRANSFER_UNKNOWN, - sfd->data); + sfd ? sfd->data : NULL); yahoo_remove_active_transfer(sfd); } @@ -5151,7 +5154,7 @@ else { YAHOO_CALLBACK(ext_yahoo_file_transfer_done) (yid->yd->client_id, YAHOO_FILE_TRANSFER_UNKNOWN, - sfd->data); + sfd ? sfd->data : NULL); yahoo_remove_active_transfer(sfd); } @@ -5266,7 +5269,7 @@ else if (!sfd || action == YAHOO_FILE_TRANSFER_REJECT) { YAHOO_CALLBACK(ext_yahoo_file_transfer_done) (yd->client_id, YAHOO_FILE_TRANSFER_REJECT, - sfd->data); + sfd ? sfd->data : NULL); yahoo_remove_active_transfer(sfd); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |