mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Possible fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37868
This commit is contained in:
parent
73a3c3a704
commit
dc6c8ea422
|
@ -166,6 +166,9 @@ public final class ErrorCorrection {
|
||||||
ModulusPoly errorLocator,
|
ModulusPoly errorLocator,
|
||||||
int[] errorLocations) {
|
int[] errorLocations) {
|
||||||
int errorLocatorDegree = errorLocator.getDegree();
|
int errorLocatorDegree = errorLocator.getDegree();
|
||||||
|
if (errorLocatorDegree < 1) {
|
||||||
|
return new int[0];
|
||||||
|
}
|
||||||
int[] formalDerivativeCoefficients = new int[errorLocatorDegree];
|
int[] formalDerivativeCoefficients = new int[errorLocatorDegree];
|
||||||
for (int i = 1; i <= errorLocatorDegree; i++) {
|
for (int i = 1; i <= errorLocatorDegree; i++) {
|
||||||
formalDerivativeCoefficients[errorLocatorDegree - i] =
|
formalDerivativeCoefficients[errorLocatorDegree - i] =
|
||||||
|
|
Loading…
Reference in a new issue