Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for Windows build failures, and stack overwrite - see #39 and #41 #40

Closed
wants to merge 3 commits into from

Conversation

andyburras
Copy link

@andyburras andyburras commented Dec 21, 2017

Fix for stack overwrite - see #41


Fixes for Windows build failures - see
#39

This should all be "transparent" changes. The code has been refactored to remove the dependency on g++ support for non-standard C++ features.

  • Visual Studio project does not compile with latest (2017) version.
    Created .sln and .vcxproj for Visual Studio 2017 following previous naming convention.

  • In PostprocessData.cpp:

for (int j = i; list[j].offset < (offset + segmentSizes[index]); j++) {
...
}
errprint("[...]",index, list[j].offset);

Does not obey C++ standard rules - the scope of the name(s) declared extends to the end of the for statement.
Change: Initialised 'j' prior to the loop.

  • In ValidateAtoms.cpp:

char vsdi_name[strlen(vsdi.name)];
and saio_offset ...

Using non-standard C++ dynamic array length.
Change: vsdi.name is a fixed length, so introduced a #define value.
Change: Allocated 'saio_offset' using new.

  • In ValidateMP4.h:

true and false are #defined.

C++ Standard Library forbids macroizing keywords
Change: Commented out the #define of true and false in ValidateMP4.h

Andy Burras added 2 commits December 21, 2017 15:28
#39

This should all be "transparent" changes. The code has been refactored
to remove the dependency on g++ support for non-standard C++ features.

* Visual Studio project does not compile with latest (2017) version.
> Created .sln and .vcxproj for Visual Studio 2017 following previous
naming convention.

* In PostprocessData.cpp:
for (int j = i; list[j].offset < (offset + segmentSizes[index]); j++) {
...
}
errprint("[...]",index, list[j].offset);
Does not obey C++ standard rules - the scope of the name(s) declared
extends to the end of the for statement.
> Initialised 'j' prior to the loop.

* In ValidateAtoms.cpp:
char vsdi_name[strlen(vsdi.name)];
and saio_offset ...
Using non-standard C++ (dynamic array length)
> vsdi.name is a fixed length, so introduced a #define value.
> Allocated 'saio_offset' using new.

* In ValidateMP4.h:
true and false are #defined.
C++ Standard Library forbids macroizing keywords
> Commented out the #define of true and false in ValidateMP4.h
@andyburras andyburras changed the title Fixes for Windows build failures - see Fixes for Windows build failures, and stack overwrite - see #39 and #41 Jan 2, 2018
@andyburras andyburras closed this by deleting the head repository Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant