Blame otp-0012-Remove-strange-name-field-in-efile_drv.c-as-it-upset.patch

Hans Ulrich Niedermann f7fc57
From: Patrik Nyblom <pan@erlang.org>
Hans Ulrich Niedermann f7fc57
Date: Wed, 12 Jan 2011 15:41:46 +0100
Hans Ulrich Niedermann 696873
Subject: [PATCH] Remove strange name field in efile_drv.c as it upsets -D_FORTIFY_SOURCE
Hans Ulrich Niedermann f7fc57
Hans Ulrich Niedermann f7fc57
---
Hans Ulrich Niedermann f7fc57
 erts/emulator/drivers/common/efile_drv.c |    5 ++---
Hans Ulrich Niedermann f7fc57
 1 files changed, 2 insertions(+), 3 deletions(-)
Hans Ulrich Niedermann f7fc57
Hans Ulrich Niedermann f7fc57
diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c
Hans Ulrich Niedermann f7fc57
index 786fa7d..6449c6f 100644
Hans Ulrich Niedermann f7fc57
--- a/erts/emulator/drivers/common/efile_drv.c
Hans Ulrich Niedermann f7fc57
+++ b/erts/emulator/drivers/common/efile_drv.c
Hans Ulrich Niedermann f7fc57
@@ -385,7 +385,6 @@ struct t_data
Hans Ulrich Niedermann f7fc57
 	    ErlDrvBinary *binp;
Hans Ulrich Niedermann f7fc57
 	    int           size;
Hans Ulrich Niedermann f7fc57
 	    int           offset;
Hans Ulrich Niedermann f7fc57
-	    char          name[1];
Hans Ulrich Niedermann f7fc57
 	} read_file;
Hans Ulrich Niedermann f7fc57
 	struct {
Hans Ulrich Niedermann f7fc57
 	    struct t_readdir_buf *first_buf;
Hans Ulrich Niedermann f7fc57
@@ -1117,7 +1116,7 @@ static void invoke_read_file(void *data)
Hans Ulrich Niedermann f7fc57
 	Sint64 size;
Hans Ulrich Niedermann f7fc57
 	
Hans Ulrich Niedermann f7fc57
 	if (! (d->result_ok = 
Hans Ulrich Niedermann f7fc57
-	       efile_openfile(&d->errInfo, d->c.read_file.name, 
Hans Ulrich Niedermann f7fc57
+	       efile_openfile(&d->errInfo, d->b, 
Hans Ulrich Niedermann f7fc57
 			      EFILE_MODE_READ, &fd, &size))) {
Hans Ulrich Niedermann f7fc57
 	    goto done;
Hans Ulrich Niedermann f7fc57
 	}
Hans Ulrich Niedermann f7fc57
@@ -3071,7 +3070,7 @@ file_outputv(ErlDrvData e, ErlIOVec *ev) {
Hans Ulrich Niedermann f7fc57
 	d->command = command;
Hans Ulrich Niedermann f7fc57
 	d->reply = !0;
Hans Ulrich Niedermann f7fc57
 	/* Copy name */
Hans Ulrich Niedermann f7fc57
-	FILENAME_COPY(d->c.read_file.name, filename);
Hans Ulrich Niedermann f7fc57
+	FILENAME_COPY(d->b, filename);
Hans Ulrich Niedermann f7fc57
 	d->c.read_file.binp = NULL;
Hans Ulrich Niedermann f7fc57
 	d->invoke = invoke_read_file;
Hans Ulrich Niedermann f7fc57
 	d->free = free_read_file;