summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/patchelf.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/patchelf.cc b/src/patchelf.cc
index db18837..ca247c1 100644
--- a/src/patchelf.cc
+++ b/src/patchelf.cc
@@ -479,6 +479,8 @@ static void writeFile(const std::string & fileName, const FileContents & content
static uint64_t roundUp(uint64_t n, uint64_t m)
{
+ if (n == 0)
+ return m;
return ((n - 1) / m + 1) * m;
}