Skip to content

Commit a4a045e

Browse files
committed
Make sure any security on standalones is processed (in commercial).
1 parent e9f6a77 commit a4a045e

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

engine/src/capsule.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
3131
#include "md5.h"
3232
#include "capsule.h"
3333

34+
#include "stacksecurity.h"
35+
3436
#include <zlib.h>
3537

3638
////////////////////////////////////////////////////////////////////////////////
@@ -483,7 +485,10 @@ static bool MCCapsuleRead(MCCapsuleRef self, void *p_buffer, uint32_t p_buffer_s
483485
// for, the input must be eof.
484486
if (self -> buckets_complete)
485487
self -> input_eof = (t_amount != t_amount_read);
486-
488+
489+
// Process any security features.
490+
MCStackSecurityProcessCapsule(self -> decompress . next_in + self -> decompress . avail_in, self -> input_buffer + self -> input_frontier + t_amount_read);
491+
487492
// Adjust the data pointers
488493
self -> input_frontier += t_amount_read;
489494
self -> decompress . avail_in = (self -> input_buffer + self -> input_frontier - sizeof(uint32_t)) - (self -> decompress . next_in + self -> decompress . avail_in);

engine/src/stacksecurity.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,10 @@ IO_stat MCStackSecurityRead(char *r_string, uint32_t p_length, IO_handle p_strea
100100
return t_stat;
101101
}
102102

103+
///////////
104+
105+
void MCStackSecurityProcessCapsule(void *p_start, void *p_finish)
106+
{
107+
}
108+
103109
////////////////////////////////////////////////////////////////////////////////

engine/src/stacksecurity.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ void MCStackSecuritySetIOEncryptionEnabled(bool p_encrypted);
4646
IO_stat MCStackSecurityWrite(const char *p_string, uint32_t p_length, IO_handle p_stream);
4747
IO_stat MCStackSecurityRead(char *r_string, uint32_t p_length, IO_handle p_stream);
4848

49+
//////////
50+
51+
void MCStackSecurityProcessCapsule(void *p_start, void *p_finish);
52+
4953
////////////////////////////////////////////////////////////////////////////////
5054

5155
#endif

0 commit comments

Comments
 (0)