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

Non-antialiasing with FreeType 2 corrupts images. #2

Closed
mapserver-bot opened this issue Apr 3, 2012 · 1 comment
Closed

Non-antialiasing with FreeType 2 corrupts images. #2

mapserver-bot opened this issue Apr 3, 2012 · 1 comment

Comments

@mapserver-bot
Copy link

Reporter: sdlime
Date: 2001/04/13 - 06:06
Trac URL: http://trac.osgeo.org/mapserver/ticket/2

Not using antialiasing with TrueType fonts and FreeType 2 causes corruption of 
GD image output. Most likely a GD/FreeType problem, but I told John that I 
would patch both versions of the GD/FreeType code to fix font rendering with 
non-antialiased fonts. With FreeType 1 there is an error in his code that 
always requests grayscale pixmaps even with no antialiasing. It should request 
a bitmap instead. Fix is to add a key to his caching code and this was already 
written for versions 3.4 and earlier. I suspect the same problem exists with 
FreeType 2 since it uses the same caching code, however since not setting the 
antialias flag corrupts the image I can't tell. Will have to fix that first.

Workaround is to use antialiasing with TrueType fonts.
@mapserver-bot
Copy link
Author

Author: sdlime
Date: 2006/04/28 - 04:29

We've come a long way since this bug was written. Closing...

Steve

@ghost ghost assigned sdlime Apr 5, 2012
geographika pushed a commit that referenced this issue Mar 13, 2019
Travis setup to compile mapscript_csharp for linux
rouault pushed a commit that referenced this issue Feb 13, 2020
* Add MSSQL to CI

* Update db script and Python tests

* Turn off shallow_clone to clone msautotest

* Restrict clone size

* Add mssql test case and results

* Build MSSQL driver

* Remove include directory that breaks build

* Set projection and update results paths

* Use file protocol for pip

* Change test order

* Add MSSQL to CI

* Update db script and Python tests

* Turn off shallow_clone to clone msautotest

* Fix YAML issues with %

* Add full path to work on Windows

* Ignore test on Windows as it fails

* Update test and skip failing tests

* Fix some compiler warnings and disable the rest
wilhelmberg added a commit to wilhelmberg/mapserver that referenced this issue Feb 21, 2020
jmckenna pushed a commit that referenced this issue Apr 23, 2020
rouault pushed a commit to rouault/mapserver that referenced this issue Jun 24, 2021
OGCAPI fixes and enhancements
rouault pushed a commit to rouault/mapserver that referenced this issue Jun 14, 2022
rouault added a commit to rouault/mapserver that referenced this issue Oct 3, 2022
Found locally with ossfuzz

```
Direct leak of 1304 byte(s) in 1 object(s) allocated from:
    #0 0x54de9e in __interceptor_calloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:77:3
    MapServer#1 0x5c6ce8 in msGrowClassStyles /src/MapServer/mapfile.c:3020:48
    MapServer#2 0x5c8513 in loadClass /src/MapServer/mapfile.c:3262:12
    MapServer#3 0x5d0f1e in loadLayer /src/MapServer/mapfile.c:3968:12
    MapServer#4 0x5ec0a0 in loadMapInternal /src/MapServer/mapfile.c:6053:12
    MapServer#5 0x5ef850 in msLoadMap /src/MapServer/mapfile.c:6333:6
    MapServer#6 0x58b1df in LLVMFuzzerTestOneInput /src/MapServer/build/../fuzzers/mapfuzzer.c:50:13
    MapServer#7 0x45cb33 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
    MapServer#8 0x45c31a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
    MapServer#9 0x45d9e9 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:757:19
    MapServer#10 0x45e6b5 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:895:5
    MapServer#11 0x44da1f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
    MapServer#12 0x477072 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    MapServer#13 0x7f8124cb8082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
```
github-actions bot pushed a commit that referenced this issue Oct 4, 2022
Found locally with ossfuzz

```
Direct leak of 1304 byte(s) in 1 object(s) allocated from:
    #0 0x54de9e in __interceptor_calloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:77:3
    #1 0x5c6ce8 in msGrowClassStyles /src/MapServer/mapfile.c:3020:48
    #2 0x5c8513 in loadClass /src/MapServer/mapfile.c:3262:12
    #3 0x5d0f1e in loadLayer /src/MapServer/mapfile.c:3968:12
    #4 0x5ec0a0 in loadMapInternal /src/MapServer/mapfile.c:6053:12
    #5 0x5ef850 in msLoadMap /src/MapServer/mapfile.c:6333:6
    #6 0x58b1df in LLVMFuzzerTestOneInput /src/MapServer/build/../fuzzers/mapfuzzer.c:50:13
    #7 0x45cb33 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
    #8 0x45c31a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
    #9 0x45d9e9 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:757:19
    #10 0x45e6b5 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:895:5
    #11 0x44da1f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
    #12 0x477072 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #13 0x7f8124cb8082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
```
github-actions bot pushed a commit that referenced this issue Oct 4, 2022
Found locally with ossfuzz

```
Direct leak of 1304 byte(s) in 1 object(s) allocated from:
    #0 0x54de9e in __interceptor_calloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:77:3
    #1 0x5c6ce8 in msGrowClassStyles /src/MapServer/mapfile.c:3020:48
    #2 0x5c8513 in loadClass /src/MapServer/mapfile.c:3262:12
    #3 0x5d0f1e in loadLayer /src/MapServer/mapfile.c:3968:12
    #4 0x5ec0a0 in loadMapInternal /src/MapServer/mapfile.c:6053:12
    #5 0x5ef850 in msLoadMap /src/MapServer/mapfile.c:6333:6
    #6 0x58b1df in LLVMFuzzerTestOneInput /src/MapServer/build/../fuzzers/mapfuzzer.c:50:13
    #7 0x45cb33 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:611:15
    #8 0x45c31a in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:514:3
    #9 0x45d9e9 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:757:19
    #10 0x45e6b5 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, std::__Fuzzer::allocator<fuzzer::SizedFile> >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:895:5
    #11 0x44da1f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:912:6
    #12 0x477072 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #13 0x7f8124cb8082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
```
rouault added a commit to rouault/mapserver that referenced this issue Aug 30, 2024
…transform to SLD

but there's a memory leak

```
Direct leak of 42 byte(s) in 1 object(s) allocated from:
    #0 0x7efd24675c3e in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:163
    MapServer#1 0x7efd23473913 in msStringConcatenate /home/runner/work/MapServer/MapServer/src/mapstring.cpp:1428
    MapServer#2 0x7efd2346c344 in yylex src/mapparser.y:1094
    MapServer#3 0x7efd23460946 in yyparse /home/runner/work/MapServer/MapServer/src/mapparser.c:1584
    MapServer#4 0x7efd237a32bb in msSLDGenerateTextSLD /home/runner/work/MapServer/MapServer/src/mapogcsld.cpp:4231
    MapServer#5 0x7efd237a6b7d in msSLDGenerateUserStyle /home/runner/work/MapServer/MapServer/src/mapogcsld.cpp:4575
    MapServer#6 0x7efd237a7438 in msSLDGenerateSLDLayer /home/runner/work/MapServer/MapServer/src/mapogcsld.cpp:4642
    MapServer#7 0x7efd2379ba41 in msSLDGenerateSLD /home/runner/work/MapServer/MapServer/src/mapogcsld.cpp:3445
    MapServer#8 0x7efd23162ec0 in msWMSGetStyles /home/runner/work/MapServer/MapServer/src/mapwms.cpp:5474
    MapServer#9 0x7efd23165527 in msWMSDispatch /home/runner/work/MapServer/MapServer/src/mapwms.cpp:5777
    MapServer#10 0x7efd231b6144 in msOWSDispatch /home/runner/work/MapServer/MapServer/src/mapows.c:290
    MapServer#11 0x7efd2342c89d in msCGIDispatchRequest /home/runner/work/MapServer/MapServer/src/mapservutil.c:2240
    MapServer#12 0x5589f3102f00 in main /home/runner/work/MapServer/MapServer/src/apps/mapserv.c:294
    MapServer#13 0x7efd22788082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082)
```
rouault added a commit to rouault/mapserver that referenced this issue Aug 30, 2024
…transform to SLD

but there's a memory leak

```
Direct leak of 42 byte(s) in 1 object(s) allocated from:
    #0 0x7efd24675c3e in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:163
    MapServer#1 0x7efd23473913 in msStringConcatenate /home/runner/work/MapServer/MapServer/src/mapstring.cpp:1428
    MapServer#2 0x7efd2346c344 in yylex src/mapparser.y:1094
    MapServer#3 0x7efd23460946 in yyparse /home/runner/work/MapServer/MapServer/src/mapparser.c:1584
    MapServer#4 0x7efd237a32bb in msSLDGenerateTextSLD /home/runner/work/MapServer/MapServer/src/mapogcsld.cpp:4231
    MapServer#5 0x7efd237a6b7d in msSLDGenerateUserStyle /home/runner/work/MapServer/MapServer/src/mapogcsld.cpp:4575
    MapServer#6 0x7efd237a7438 in msSLDGenerateSLDLayer /home/runner/work/MapServer/MapServer/src/mapogcsld.cpp:4642
    MapServer#7 0x7efd2379ba41 in msSLDGenerateSLD /home/runner/work/MapServer/MapServer/src/mapogcsld.cpp:3445
    MapServer#8 0x7efd23162ec0 in msWMSGetStyles /home/runner/work/MapServer/MapServer/src/mapwms.cpp:5474
    MapServer#9 0x7efd23165527 in msWMSDispatch /home/runner/work/MapServer/MapServer/src/mapwms.cpp:5777
    MapServer#10 0x7efd231b6144 in msOWSDispatch /home/runner/work/MapServer/MapServer/src/mapows.c:290
    MapServer#11 0x7efd2342c89d in msCGIDispatchRequest /home/runner/work/MapServer/MapServer/src/mapservutil.c:2240
    MapServer#12 0x5589f3102f00 in main /home/runner/work/MapServer/MapServer/src/apps/mapserv.c:294
    MapServer#13 0x7efd22788082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants