Re: BUG #4912: server core dumps on xslt_process with empty param string
От | Tom Lane |
---|---|
Тема | Re: BUG #4912: server core dumps on xslt_process with empty param string |
Дата | |
Msg-id | 8761.1247180901@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | BUG #4912: server core dumps on xslt_process with empty param string ("Tom Bowden" <tom.bowden@fis-cal.com>) |
Список | pgsql-bugs |
"Tom Bowden" <tom.bowden@fis-cal.com> writes: > I found that when using xslt_process(), either with two parameters, or with > an empty/null third parameter -- that I get a 'server restarted' message. Hm, I don't. regression=# select xslt_process('<a/>','<b/>'); xslt_process -------------- (1 row) regression=# select xslt_process('<a/>','<b/>', ''); xslt_process -------------- (1 row) > To stop this behavior, I changed the source code in contrib/xml2/xslt_proc.c > (around line 142) .. adding the following: > if ( pstr == NULL || strlen(pstr) < 1 ) { > params[0] = NULL; > return; > } I can't see that this would fix anything. A NULL value there is impossible, and if the string is empty, the loop below should fall out after properly setting param[0] to NULL. It does look a bit questionable whether the code does the right thing when MAXPARAMS gets overrun, but I'm really not seeing what you're seeing. Are you sure you are using 8.4 and an 8.4 version of xml2? regards, tom lane
В списке pgsql-bugs по дате отправления: