Skip to content

Commit

Permalink
Revert "Remove ssl context variables from Polaris context if compiled…
Browse files Browse the repository at this point in the history
… out."

We cannot remove these. Internally, polaris.c accesses them if POLARIS_USE_TLS
is enabled _when polaris.c is compiled_. But if the user application does not
set POLARIS_USE_TLS when they compile and instantiate PolarisContext_s, the
context they create will be smaller than polaris.c is expecting and will cause a
buffer overflow.
  • Loading branch information
adamshapiro0 committed Mar 26, 2024
1 parent c7a3db7 commit 3a7cd21
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions c/src/point_one/polaris/polaris.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,10 @@ struct PolarisContext_s {
PolarisCallback_t rtcm_callback;
void* rtcm_callback_info;

#ifdef POLARIS_USE_TLS
// Note: We're using void* to avoid needing the inclusion of SSL libs in the
// header file.
void* ssl_ctx;
void* ssl;
#endif // POLARIS_USE_TLS
};

#ifdef __cplusplus
Expand Down

0 comments on commit 3a7cd21

Please sign in to comment.