fix for get_meta_tags
| From: | Thomas Schaefer | Date: | Sat, 19 Jun 1999 16:20:00 +0000 |
| Subject: | fix for get_meta_tags | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-7152@lists.php.net to get a copy of this message | ||
Dear Development-Team,
I found a bug in the get_meta_tags-function in file.c:
If the meta-tag-line contains a newline the php produces
a reproduceable crash (sometimes it returns memorydumps as
content-values).
Testet on php3.0.9 on Linux (Suse 6.1).
Since I had no time
to wait but time to work, I wrote a small fix for the bug
(file functions/file.c):
------------------------------------------------
318a319
> val=NULL;
319a321,324
> if(!tmp)
> if(!(issock?SOCK_FGETS(buf,8191,socketd):fgets(buf,8191,fp))
> != NULL && !php3i_stristr(buf,"</head>") )
> break;
> tmp=php3i_stristr(buf,"content=\"");
-------------------------------------------------
Maybe you find it usefull and include it to the next version
of php.
Bye,
Tom
---
Thomas Schäfer - Bürgernetz GAP-Online e.V. Garmisch-Partenkirchen