Update main.c check pos before getc

fc-jy-img
Alan Johnston 11 months ago committed by GitHub
parent 794bb40ff2
commit a5a0f1a8a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2336,7 +2336,7 @@ void get_tlm_fc() { // FunCube Mode telemetry generation
int value; int value;
if (image_file != NULL) { if (image_file != NULL) {
printf("Writing image data to payload\n"); printf("Writing image data to payload\n");
while (((value = getc(image_file)) != EOF) && (pos < 256)) { while ((pos < 256) && ((value = getc(image_file)) != EOF)) {
source_bytes[pos++] = value; source_bytes[pos++] = value;
printf("%2x ", value); printf("%2x ", value);
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.