CodeAnt AI home pagelight logodark logo
  • Support
  • Dashboard
  • Dashboard
  • Join Community
Start Here
  • What is CodeAnt?
Setup
  • Github
  • Bitbucket
  • Gitlab
  • Azure Devops
Pull Request Review
  • Features
  • Customize Review
  • Quality Gates
  • Integrations
Scan center
  • Code Security
  • Code Quality
  • Cloud Security
  • Engineering Productivity
Integrations
  • Jira
  • Test Coverage
  • CI/CD
IDE
  • Setup
  • Review
  • Enhancements
Rule Reference
  • Compliance
  • Anti-Patterns
  • Code Governance
  • Infrastructure Security Database
  • Application Security Database
    • Apex
    • Bash
    • C
    • Clojure
    • Cpp
      • Lang
        • Correctness
        • Security
          • Containers
          • Crypto
          • Filesystem
          • Format-string
          • Ldap
          • Libraries
          • Memory
          • Misc
          • Rng
          • Sql
          • Strings
            • Alloc-strlen
            • Missing-nul-cpp-string-memcpy
            • Narrow-to-wide-string-mismatch
            • Readlink-null-terminator
            • Return-c-str
            • Snprintf-return-value-length
            • Snprintf-return-value-snprintf
            • Snprintf-source-size
            • Std-string-npos
              • Std string npos
            • String-buffer-overflow
            • String-view-data-null-terminator
            • String-view-temporary-string
            • Unbounded-copy-to-stack-buffer
            • Wide-to-narrow-string-mismatch
          • System-command
          • Uri
          • Use-after-free
      • Libxml2
    • Csharp
    • Dockerfile
    • Elixir
    • Fingerprints
    • Generic
    • Go
    • Html
    • Java
    • Javascript
    • Json
    • Kotlin
    • Ocaml
    • Php
    • Problem-based-packs
    • Python
    • Ruby
    • Rust
    • Scala
    • Solidity
    • Swift
    • Terraform
    • Typescript
    • Yaml
Resources
  • Open Source
  • Blogs
Std-string-npos

Std string npos

std-string-npos

The return value of $VAR.$NPOS_CALL(...) has been modified so it can never equal std::string::npos. This could lead to an std::out_of_range exception being thrown or trigger an out-of-bounds read if the position is used as an array index.
Likelihood: LOW
Confidence: HIGH
CWE:
- CWE-125: Out-of-bounds Read
Snprintf source sizeString buffer overflow
twitterlinkedin
Powered by Mintlify
Assistant
Responses are generated using AI and may contain mistakes.