commit | 47c4808023acf2f821df344271e532478b1ee1aa | [log] [tgz] |
---|---|---|
author | Geoff Lang <geofflang@chromium.org> | Wed Dec 07 15:38:13 2016 -0500 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Dec 07 23:50:48 2016 +0000 |
tree | ab346b11bd0e932afffd2c4daae20f9dbcb96a4f | |
parent | 2d73665d48185022fe7ab8218974e5ef3c9e8f2a [diff] [blame] |
Validate that line width is not NaN. BUG=668223 Change-Id: I2f38b358dd4a6b9327562704dacce37f2b16acaa Reviewed-on: https://chromium-review.googlesource.com/417192 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp index 943a73e..ea3bbf9 100644 --- a/src/libANGLE/validationES2.cpp +++ b/src/libANGLE/validationES2.cpp
@@ -3864,4 +3864,15 @@ return true; } +bool ValidateLineWidth(ValidationContext *context, GLfloat width) +{ + if (width <= 0.0f || isNaN(width)) + { + context->handleError(Error(GL_INVALID_VALUE, "Invalid width value.")); + return false; + } + + return true; +} + } // namespace gl