summaryrefslogtreecommitdiff
path: root/gcc/ada/g-socthi-mingw.adb
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-14 09:27:22 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-14 09:27:22 +0000
commit596ea70504228c69f6c7158ed9be4355b3682d1d (patch)
treea396213071a122c510fde1a4daca3fdf25909b3a /gcc/ada/g-socthi-mingw.adb
parent853000f290c8b1f2f903a858de1b98e22b3db326 (diff)
downloadgcc-596ea70504228c69f6c7158ed9be4355b3682d1d.tar.gz
PR ada/48711
* g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176265 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-socthi-mingw.adb')
-rw-r--r--gcc/ada/g-socthi-mingw.adb3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/g-socthi-mingw.adb b/gcc/ada/g-socthi-mingw.adb
index 727a69ddba9..697425ef227 100644
--- a/gcc/ada/g-socthi-mingw.adb
+++ b/gcc/ada/g-socthi-mingw.adb
@@ -277,7 +277,8 @@ package body GNAT.Sockets.Thin is
use type C.size_t;
Fill : constant Boolean :=
- (C.unsigned (Flags) and SOSC.MSG_WAITALL) /= 0;
+ SOSC.MSG_WAITALL /= -1
+ and then (C.unsigned (Flags) and SOSC.MSG_WAITALL) /= 0;
-- Is the MSG_WAITALL flag set? If so we need to fully fill all vectors
Res : C.int;