cginternals / cginternals/glbinding

Calling getExtension with empty string results in exception

Open
#363 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
877
Forks
95
PR merge metrics
No merged PRs in 30d

Description

When calling glbinding::aux::Meta::getExtension(const std::string & extension) with an empty string an exception is thrown as the function attempts to access the string at a specific index unchecked when trying to skip the prefix.

See:
https://github.com/cginternals/glbinding/blob/69e75ea4907933ba302eeb5fd6f95495210f2f30/source/glbinding-aux/source/Meta.cpp#L97

https://github.com/cginternals/glbinding/blob/69e75ea4907933ba302eeb5fd6f95495210f2f30/source/glbinding-aux/source/Meta.cpp#L49

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in source/glbinding-aux/source/Meta.cpp at the referenced lines in getExtension and the prefix-skipping logic. Reproduce the issue with an empty extension string, then inspect the existing tests or test setup for Meta. Done means calling getExtension with an empty string no longer throws an exception and the relevant test passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.