captive_rtl_file_mmap(): Fixed mmap(2) error check.
authorshort <>
Sat, 13 Sep 2003 06:50:58 +0000 (06:50 +0000)
committershort <>
Sat, 13 Sep 2003 06:50:58 +0000 (06:50 +0000)
src/libcaptive/rtl/file.c

index 63fc433..c821474 100644 (file)
@@ -92,7 +92,7 @@ off_t lenoff;
                        fd,
                        0       /* offset */
                        );
-       if (r==NULL) {
+       if (r==MAP_FAILED || r==NULL) {
                g_assert_not_reached();
                goto err_close;
                }