|
From: wasted <wa...@fi...> - 2003-12-29 20:39:08
|
wasted 2003/12/29 14:41:16 CST
Modified files:
src mysql.c
Log:
Add lame, but possible fix for cores related to mysql_real_escape_string()
Revision Changes Path
1.3 +7 -1 wStats/src/mysql.c
Index: mysql.c
===================================================================
RCS file: /home/cvs/wstats/wStats/src/mysql.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mysql.c 22 Dec 2003 08:54:21 -0000 1.2
+++ mysql.c 29 Dec 2003 20:41:16 -0000 1.3
@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: mysql.c,v 1.2 2003/12/22 08:54:21 wasted Exp $
+ * $Id: mysql.c,v 1.3 2003/12/29 20:41:16 wasted Exp $
*/
#include <mysql/mysql.h>
@@ -150,6 +150,12 @@
addslashes(char *str)
{
char *out;
+
+ if((strchr(str, '\\') == NULL) && (strchr(str, '\'') == NULL)
+ && (strchr(str, '\"') == NULL))
+ {
+ return str;
+ }
if(str)
{
|