Enlightenment CVS committal
Author : mej
Project : eterm
Module : Eterm
Dir : eterm/Eterm/src
Modified Files:
netdisp.c options.c
Log Message:
Tue Jun 10 12:19:00 2003 Michael Jennings (mej)
Patch from Matt Zimmerman <[EMAIL PROTECTED]> to correct buffer overflow
when $ETERMPATH is set too large.
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/netdisp.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- netdisp.c 8 Jun 2002 15:44:07 -0000 1.7
+++ netdisp.c 10 Jun 2003 16:20:01 -0000 1.8
@@ -18,7 +18,7 @@
* he guarantee anything whatsoever.
*----------------------------------------------------------------------*/
-static const char cvs_ident[] = "$Id: netdisp.c,v 1.7 2002/06/08 15:44:07 mej Exp $";
+static const char cvs_ident[] = "$Id: netdisp.c,v 1.8 2003/06/10 16:20:01 mej Exp $";
#include "config.h"
#include "feature.h"
@@ -94,7 +94,7 @@
struct ifreq ifr2;
- strcpy(ifr2.ifr_name, ifr->ifr_name);
+ snprintf(ifr2.ifr_name, sizeof(ifr2.ifr_name), ifr->ifr_name);
if (ioctl(skfd, SIOCGIFADDR, &ifr2) >= 0) {
unsigned long addr;
struct sockaddr_in *p_addr;
===================================================================
RCS file: /cvsroot/enlightenment/eterm/Eterm/src/options.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -3 -r1.122 -r1.123
--- options.c 24 Apr 2003 18:30:17 -0000 1.122
+++ options.c 10 Jun 2003 16:20:01 -0000 1.123
@@ -21,7 +21,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-static const char cvs_ident[] = "$Id: options.c,v 1.122 2003/04/24 18:30:17 mej Exp
$";
+static const char cvs_ident[] = "$Id: options.c,v 1.123 2003/06/10 16:20:01 mej Exp
$";
#include "config.h"
#include "feature.h"
@@ -2414,10 +2414,10 @@
path_env = getenv(PATH_ENV);
if (path_env) {
- strcpy(path, CONFIG_SEARCH_PATH ":");
- strcat(path, path_env);
+ snprintf(path, sizeof(path), "%s:%s", CONFIG_SEARCH_PATH,
+ path_env);
} else {
- strcpy(path, CONFIG_SEARCH_PATH);
+ snprintf(path, sizeof(path), CONFIG_SEARCH_PATH);
}
shell_expand(path);
}
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs