Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP5:GA
ocaml
ocaml-In-caml_executable_name-wrong-test-on-the...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ocaml-In-caml_executable_name-wrong-test-on-the-return-cod.patch of Package ocaml
From 44c67eb438b5dabbc4caa130303d1bcda6488b00 Mon Sep 17 00:00:00 2001 From: Xavier Leroy <xavier.leroy@inria.fr> Date: Fri, 25 Aug 2017 17:56:45 +0200 Subject: In caml_executable_name(), wrong test on the return code of readlink() Follow-up to PR#795 "More robust determination of full path to current executable" --- byterun/unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/byterun/unix.c b/byterun/unix.c index a5c5ed457..9aa89c96f 100644 --- a/byterun/unix.c +++ b/byterun/unix.c @@ -374,7 +374,7 @@ char * caml_executable_name(void) name = caml_stat_alloc(namelen + 1); retcode = readlink("/proc/self/exe", name, namelen); if (retcode == -1) { caml_stat_free(name); return NULL; } - if (retcode <= namelen) break; + if (retcode < namelen) break; caml_stat_free(name); if (namelen >= 1024*1024) return NULL; /* avoid runaway and overflow */ namelen *= 2;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor