Skip to content

Commit

Permalink
Introduce aiBuffer
Browse files Browse the repository at this point in the history
We have a lot of parsing tools which are not doing any kind of bound checking. This is the first approach to solve these issues.
  • Loading branch information
kimkulling committed Jan 30, 2024
1 parent a02085e commit d5f3558
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion include/assimp/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2022, assimp team
Copyright (c) 2006-2024, assimp team
All rights reserved.
Expand Down Expand Up @@ -523,6 +523,23 @@ struct aiMemoryInfo {
unsigned int total;
}; // !struct aiMemoryInfo

/**
* @brief Type to store a in-memory data buffer.
*/
struct aiBuffer {
const char *data; ///< Begin poiner
const char *end; ///< End pointer

#ifdef __cplusplus
/// @brief The class constructor.
aiBuffer() :
data(nullptr), end(nullptr) {}

/// @brief The class destructor.
~aiBuffer() = default;
#endif //! __cplusplus
};

#ifdef __cplusplus
}
#endif //! __cplusplus
Expand Down

0 comments on commit d5f3558

Please sign in to comment.