Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Hackers > Re: another ecp...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 6 Topic 9342 of 10389
Post > Topic >>

Re: another ecpg crash

by alvherre@[EMAIL PROTECTED] (Alvaro Herrera) May 11, 2008 at 12:52 AM

Euler Taveira de Oliveira wrote:
> Hi,
>
> I found another bug when using 'exec sql include filename'. If you use a
 
> filename that doesn't exist, ecpg crashes while trying to close a null  
> pointer. The above test case shows it. A possible fix is attached.

Huh, isn't the test backwards?

> --- 90,98 ----
>   			ret_value = error_code;
>   			break;
>   		case ET_FATAL:
> ! 			/* there are some cases (i.e. file not found) that the input is not
available */
> ! 			if (!yyin)
> ! 				fclose(yyin);
>   			fclose(yyout);
>   			if (unlink(output_filename) != 0 && *output_filename != '-')
>   			        fprintf(stderr, _("could not remove output file \"%s\"\n"),
output_filename);



-- 
Alvaro Herrera                               
http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 sup****t

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
 




 6 Posts in Topic:
another ecpg crash
euler@[EMAIL PROTECTED]   2008-05-11 01:50:22 
Re: another ecpg crash
alvherre@[EMAIL PROTECTED  2008-05-11 00:52:51 
Re: another ecpg crash
euler@[EMAIL PROTECTED]   2008-05-11 02:19:05 
Re: another ecpg crash
kleptog@[EMAIL PROTECTED]  2008-05-11 11:12:52 
Re: another ecpg crash
euler@[EMAIL PROTECTED]   2008-05-12 00:43:14 
Re: another ecpg crash
meskes@[EMAIL PROTECTED]   2008-05-12 18:33:23 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 19:20:41 CDT 2008.