From 898a5a1a7558063e96b204b2b3a0833a86c0ce7f Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 1 Aug 2024 13:25:32 +0000 Subject: automatic import of compat-libgfortran-48 --- gcc48-pr65142.patch | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 gcc48-pr65142.patch (limited to 'gcc48-pr65142.patch') diff --git a/gcc48-pr65142.patch b/gcc48-pr65142.patch new file mode 100644 index 0000000..367ec16 --- /dev/null +++ b/gcc48-pr65142.patch @@ -0,0 +1,23 @@ +2016-06-01 Jakub Jelinek + + Backported from mainline + 2015-10-02 Jonathan Wakely + + PR libstdc++/65142 + * src/c++11/random.cc (random_device::_M_getval()): Check read result. + +--- libstdc++-v3/src/c++11/random.cc (revision 228423) ++++ libstdc++-v3/src/c++11/random.cc (revision 228424) +@@ -126,8 +126,10 @@ namespace std _GLIBCXX_VISIBILITY(defaul + #endif + + result_type __ret; +- std::fread(reinterpret_cast(&__ret), sizeof(result_type), +- 1, _M_file); ++ const size_t e = std::fread(reinterpret_cast(&__ret), ++ sizeof(result_type), 1, _M_file); ++ if (e != 1) ++ std::__throw_runtime_error(__N("random_device could not be read")); + return __ret; + } + -- cgit v1.2.3