https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/143302
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -296,12 +296,16 @@ static bool fillRanges(MemoryBuffer *Code,
}
if (!EmptyLengths)
Length = Lengths[I];
+if (Length == 0) {
+ errs() << "error: length should be at least 1\n";
+ return true;
+}
if (Offset + Length > CodeSize) {
err
https://github.com/kadircet edited
https://github.com/llvm/llvm-project/pull/143302
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -296,12 +296,16 @@ static bool fillRanges(MemoryBuffer *Code,
}
if (!EmptyLengths)
Length = Lengths[I];
+if (Length == 0) {
+ errs() << "error: length should be at least 1\n";
+ return true;
+}
if (Offset + Length > CodeSize) {
err
https://github.com/owenca edited
https://github.com/llvm/llvm-project/pull/143302
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -296,12 +296,16 @@ static bool fillRanges(MemoryBuffer *Code,
}
if (!EmptyLengths)
Length = Lengths[I];
+if (Length == 0) {
+ errs() << "error: length should be at least 1\n";
+ return true;
+}
if (Offset + Length > CodeSize) {
err
@@ -296,12 +296,16 @@ static bool fillRanges(MemoryBuffer *Code,
}
if (!EmptyLengths)
Length = Lengths[I];
+if (Length == 0) {
+ errs() << "error: length should be at least 1\n";
+ return true;
+}
if (Offset + Length > CodeSize) {
err
https://github.com/owenca closed
https://github.com/llvm/llvm-project/pull/143302
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/143302
>From 68f668608d800c1411fd259be569bd3db36d1b12 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 8 Jun 2025 00:36:08 -0700
Subject: [PATCH] [clang-format] Fix an off-by-1 bug with -length option
Also validate t
https://github.com/HazardyKnusperkeks approved this pull request.
https://github.com/llvm/llvm-project/pull/143302
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/143302
>From 68f668608d800c1411fd259be569bd3db36d1b12 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 8 Jun 2025 00:36:08 -0700
Subject: [PATCH] [clang-format] Fix an off-by-1 bug with -length option
Also validate t
llvmbot wrote:
@llvm/pr-subscribers-clang-format
Author: Owen Pan (owenca)
Changes
Also validate the argument value.
Fixes #56245
---
Full diff: https://github.com/llvm/llvm-project/pull/143302.diff
3 Files Affected:
- (modified) clang/test/Format/multiple-inputs-error.cpp (+1-1)
- (
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/143302
Also validate the argument value.
Fixes #56245
>From 30e0165a2d5c7ee8fc6b7f1edcf9322e18f4334e Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 8 Jun 2025 00:36:08 -0700
Subject: [PATCH] [clang-format] Fix an
13 matches
Mail list logo