[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1.3-44-ga8b9a07

Service Account noreply at mpich.org
Fri Oct 24 15:57:07 CDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  a8b9a0716215260e9b08b1c0cba89c613fffe918 (commit)
      from  4ce4103ae1ee924c8d27dc5202f669e6bb5e8a35 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/a8b9a0716215260e9b08b1c0cba89c613fffe918

commit a8b9a0716215260e9b08b1c0cba89c613fffe918
Author: Rob Latham <robl at mcs.anl.gov>
Date:   Fri Oct 24 09:31:28 2014 -0500

    guard against null file data representation
    
    "native", "internal", and "external32" are the only valid values for
    datarep, but if a user passes null
    (http://stackoverflow.com/questions/26548398/segmentation-fault-while-using-mpi-file-read-at/)
    then strcmp will segfault.
    
    Signed-off-by: Wesley Bland <wbland at anl.gov>

diff --git a/src/mpi/romio/mpi-io/set_view.c b/src/mpi/romio/mpi-io/set_view.c
index 7f871c7..4a820a8 100644
--- a/src/mpi/romio/mpi-io/set_view.c
+++ b/src/mpi/romio/mpi-io/set_view.c
@@ -126,12 +126,12 @@ int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype,
 	goto fn_exit;
     }
 
-    if (strcmp(datarep, "native") && 
+    if ((datarep == NULL) || (strcmp(datarep, "native") &&
 	    strcmp(datarep, "NATIVE") &&
 	    strcmp(datarep, "external32") &&
 	    strcmp(datarep, "EXTERNAL32") &&
 	    strcmp(datarep, "internal") &&
-	    strcmp(datarep, "INTERNAL"))
+	    strcmp(datarep, "INTERNAL")) )
     {
 	error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
 					  myname, __LINE__,

-----------------------------------------------------------------------

Summary of changes:
 src/mpi/romio/mpi-io/set_view.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list