CS.CONSTCOND.WHILE

“while”语句的条件始终为 true 或始终为 false。

示例 1

复制
  class Something {
      void DoSomething() {
          while (false) {    // defect
              /* ...*/
          }
          while (true) {     // Ok - typical usage of 'do' constructs when a user to organize an infinite loop
              /* ...*/
          }
      }
 }

安全培训

应用程序安全培训材料由 Secure Code Warrior 提供。