From 7b803ac5574259f457ef7bf27c305ab2b2bbd167 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Wed, 6 Apr 2016 09:45:45 +0900 Subject: [PATCH] MPI_Unpack: fix error code when insize <= 0 this fixes a regression from open-mpi/ompi@f2e33c725fa77cfd8ecd585d131e9ae4c6497714 --- ompi/mpi/c/unpack.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ompi/mpi/c/unpack.c b/ompi/mpi/c/unpack.c index 133653e860..2bc5894069 100644 --- a/ompi/mpi/c/unpack.c +++ b/ompi/mpi/c/unpack.c @@ -101,6 +101,8 @@ int MPI_Unpack(const void *inbuf, int insize, int *position, rc = opal_convertor_unpack( &local_convertor, &outvec, &iov_count, &size ); *position += size; OBJ_DESTRUCT( &local_convertor ); + } else { + rc = 1; } OPAL_CR_EXIT_LIBRARY();