caryll / otfcc

Optimized OpenType builder and inspector.
Apache License 2.0
422 stars 63 forks source link

otffccdump 0.6.0 Segmentation fault while JSON last brace #41

Closed cwchien closed 7 years ago

cwchien commented 7 years ago

Source Han Sans 1.004 for example: SourceHanSansCN-Bold.otf

$ otfccdump -v
This is otfccdump, version 0.6.0.
$ otfccdump SourceHanSansCN-Bold.otf
......
            "latn": {
                "defaultBaseline": "romn",
                "baselines": {
                    "icfb": 35,
                    "icft": 965,
                    "ideo": 0,
                    "romn": 120
                }
            }
        }
    }
Segmentation fault

compared with otfccdump 0.5.2 for the same file:

$ otfccdump -v
This is otfccdump, version 0.5.2.
$ otfccdump SourceHanSansCN-Bold.otf
......
            "latn": {
                "defaultBaseline": "romn",
                "baselines": {
                    "icfb": 35,
                    "icft": 965,
                    "ideo": 0,
                    "romn": 120
                }
            }
        }
    }
}

OS: Ubuntu 16.10 64bit GCC: 6.2.0 20161005 Premake : 5.0.0-alpha10 GMake: 4.1 otfcc built with:

$premake5 gmake
$cd build/gmake/
$make config=release_x64

otfcc-0.6.0 binary Google Drive

be5invis commented 7 years ago

Fixed in 0.6.1.

cwchien commented 7 years ago

Confirmed. Thanks. :)