SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
33
multimedia/libvidstab/patches/patch-src_serialize_c
Normal file
33
multimedia/libvidstab/patches/patch-src_serialize_c
Normal file
|
@ -0,0 +1,33 @@
|
|||
Fix infinite loops on archs where char is unsigned by default (arm* and powerpc),
|
||||
because EOF cannot be reached with an unsigned char there.
|
||||
|
||||
Index: src/serialize.c
|
||||
--- src/serialize.c.orig
|
||||
+++ src/serialize.c
|
||||
@@ -41,7 +41,7 @@ int storeLocalmotion(FILE* f, const LocalMotion* lm){
|
||||
/// restore local motion from file
|
||||
LocalMotion restoreLocalmotion(FILE* f){
|
||||
LocalMotion lm;
|
||||
- char c;
|
||||
+ int c;
|
||||
if(fscanf(f,"(LM %i %i %i %i %i %lf %lf", &lm.v.x,&lm.v.y,&lm.f.x,&lm.f.y,&lm.f.size,
|
||||
&lm.contrast, &lm.match) != 7) {
|
||||
vs_log_error(modname, "Cannot parse localmotion!\n");
|
||||
@@ -71,7 +71,7 @@ int vsStoreLocalmotions(FILE* f, const LocalMotions* l
|
||||
LocalMotions vsRestoreLocalmotions(FILE* f){
|
||||
LocalMotions lms;
|
||||
int i;
|
||||
- char c;
|
||||
+ int c;
|
||||
int len;
|
||||
vs_vector_init(&lms,0);
|
||||
if(fscanf(f,"List %i [", &len) != 1) {
|
||||
@@ -128,7 +128,7 @@ int vsReadFileVersion(FILE* f){
|
||||
}
|
||||
|
||||
int vsReadFromFile(FILE* f, LocalMotions* lms){
|
||||
- char c = fgetc(f);
|
||||
+ int c = fgetc(f);
|
||||
if(c=='F') {
|
||||
int num;
|
||||
if(fscanf(f,"rame %i (", &num)!=1) {
|
Loading…
Add table
Add a link
Reference in a new issue