Mageia Bugzilla – Attachment 11268 Details for
Bug 24497
sdl2 new security issues CVE-2019-757[2-8], CVE-2019-763[5-8], and CVE-2019-13616
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Failed attempt at compiling testsprite.c.
failed_compilation (text/plain), 5.42 KB, created by
Len Lawrence
on 2019-09-01 16:59:04 CEST
(
hide
)
Description:
Failed attempt at compiling testsprite.c.
Filename:
MIME Type:
Creator:
Len Lawrence
Created:
2019-09-01 16:59:04 CEST
Size:
5.42 KB
patch
obsolete
>Download C code from https://android.googlesource.com/platform/external/qemu/+/android-4.2.2_r1.2/distrib/sdl-1.2.15/test/testsprite.c (HTML link). > >$ gcc -o testsprite -I/usr/include/SDL2 -lSDL2 testsprite.c >testsprite.c: In function âLoadSpriteâ: >testsprite.c:36:28: error: âSDL_SRCCOLORKEYâ undeclared (first use in this function); did you mean âSDL_SCANCODE_Yâ? > SDL_SetColorKey(sprite, (SDL_SRCCOLORKEY|SDL_RLEACCEL), > ^~~~~~~~~~~~~~~ > SDL_SCANCODE_Y >testsprite.c:36:28: note: each undeclared identifier is reported only once for each function it appears in >testsprite.c:40:9: warning: implicit declaration of function âSDL_DisplayFormatâ; did you mean âSDL_AllocFormatâ? [-Wimplicit-function-declaration] > temp = SDL_DisplayFormat(sprite); > ^~~~~~~~~~~~~~~~~ > SDL_AllocFormat >testsprite.c:40:7: warning: assignment to âSDL_Surface *â {aka âstruct SDL_Surface *â} from âintâ makes pointer from integer without a cast [-Wint-conversion] > temp = SDL_DisplayFormat(sprite); > ^ >testsprite.c: In function âMoveSpritesâ: >testsprite.c:80:25: error: âSDL_DOUBLEBUFâ undeclared (first use in this function); did you mean âSDL_DROPBEGINâ? > if ( (screen->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF ) { > ^~~~~~~~~~~~~ > SDL_DROPBEGIN >testsprite.c:94:3: warning: implicit declaration of function âSDL_Flipâ; did you mean âSDL_Quitâ? [-Wimplicit-function-declaration] > SDL_Flip(screen); > ^~~~~~~~ > SDL_Quit >testsprite.c:96:3: warning: implicit declaration of function âSDL_UpdateRectsâ; did you mean âSDL_UpdateTextureâ? [-Wimplicit-function-declaration] > SDL_UpdateRects(screen, nupdates, sprite_rects); > ^~~~~~~~~~~~~~~ > SDL_UpdateTexture >testsprite.c: In function âFastestFlagsâ: >testsprite.c:103:8: error: unknown type name âSDL_VideoInfoâ > const SDL_VideoInfo *info; > ^~~~~~~~~~~~~ >testsprite.c:105:11: error: âSDL_FULLSCREENâ undeclared (first use in this function); did you mean âSDL_USEREVENTâ? > flags |= SDL_FULLSCREEN; > ^~~~~~~~~~~~~~ > SDL_USEREVENT >testsprite.c:107:9: warning: implicit declaration of function âSDL_GetVideoInfoâ; did you mean âSDL_GetPowerInfoâ? [-Wimplicit-function-declaration] > info = SDL_GetVideoInfo(); > ^~~~~~~~~~~~~~~~ > SDL_GetPowerInfo >testsprite.c:107:7: warning: assignment to âconst int *â from âintâ makes pointer from integer without a cast [-Wint-conversion] > info = SDL_GetVideoInfo(); > ^ >testsprite.c:108:11: error: request for member âblit_hw_CCâ in something not a structure or union > if ( info->blit_hw_CC && info->blit_fill ) { > ^~ >testsprite.c:108:31: error: request for member âblit_fillâ in something not a structure or union > if ( info->blit_hw_CC && info->blit_fill ) { > ^~ >testsprite.c:110:12: error: âSDL_HWSURFACEâ undeclared (first use in this function); did you mean âSDL_SWSURFACEâ? > flags |= SDL_HWSURFACE; > ^~~~~~~~~~~~~ > SDL_SWSURFACE >testsprite.c:119:12: error: request for member âvideo_memâ in something not a structure or union > if ( info->video_mem*1024 > (height*width*bpp/8) ) { > ^~ >testsprite.c:120:13: error: âSDL_DOUBLEBUFâ undeclared (first use in this function); did you mean âSDL_DROPBEGINâ? > flags |= SDL_DOUBLEBUF; > ^~~~~~~~~~~~~ > SDL_DROPBEGIN >testsprite.c: In function âmainâ: >testsprite.c:145:29: error: âSDL_ANYFORMATâ undeclared (first use in this function); did you mean âSDL_HINT_NORMALâ? > videoflags = SDL_SWSURFACE|SDL_ANYFORMAT; > ^~~~~~~~~~~~~ > SDL_HINT_NORMAL >testsprite.c:169:18: error: âSDL_HWSURFACEâ undeclared (first use in this function); did you mean âSDL_SWSURFACEâ? > videoflags ^= SDL_HWSURFACE; > ^~~~~~~~~~~~~ > SDL_SWSURFACE >testsprite.c:172:18: error: âSDL_DOUBLEBUFâ undeclared (first use in this function); did you mean âSDL_DROPBEGINâ? > videoflags ^= SDL_DOUBLEBUF; > ^~~~~~~~~~~~~ > SDL_DROPBEGIN >testsprite.c:178:18: error: âSDL_FULLSCREENâ undeclared (first use in this function); did you mean âSDL_USEREVENTâ? > videoflags ^= SDL_FULLSCREEN; > ^~~~~~~~~~~~~~ > SDL_USEREVENT >testsprite.c:190:11: warning: implicit declaration of function âSDL_SetVideoModeâ; did you mean âSDL_GetVideoDriverâ? [-Wimplicit-function-declaration] > screen = SDL_SetVideoMode(width, height, video_bpp, videoflags); > ^~~~~~~~~~~~~~~~ > SDL_GetVideoDriver >testsprite.c:190:9: warning: assignment to âSDL_Surface *â {aka âstruct SDL_Surface *â} from âintâ makes pointer from integer without a cast [-Wint-conversion] > screen = SDL_SetVideoMode(width, height, video_bpp, videoflags); > ^ >testsprite.c:254:24: error: âSDL_HWACCELâ undeclared (first use in this function); did you mean âSDL_RLEACCELâ? > if ( (sprite->flags & SDL_HWACCEL) == SDL_HWACCEL ) { > ^~~~~~~~~~~ > SDL_RLEACCEL >testsprite.c:271:6: warning: implicit declaration of function âSDL_WarpMouseâ; did you mean âSDL_CaptureMouseâ? [-Wimplicit-function-declaration] > SDL_WarpMouse(screen->w/2, screen->h/2); > ^~~~~~~~~~~~~ > SDL_CaptureMouse > >Almost certainly the wrong API. >
Download C code from https://android.googlesource.com/platform/external/qemu/+/android-4.2.2_r1.2/distrib/sdl-1.2.15/test/testsprite.c (HTML link). $ gcc -o testsprite -I/usr/include/SDL2 -lSDL2 testsprite.c testsprite.c: In function âLoadSpriteâ: testsprite.c:36:28: error: âSDL_SRCCOLORKEYâ undeclared (first use in this function); did you mean âSDL_SCANCODE_Yâ? SDL_SetColorKey(sprite, (SDL_SRCCOLORKEY|SDL_RLEACCEL), ^~~~~~~~~~~~~~~ SDL_SCANCODE_Y testsprite.c:36:28: note: each undeclared identifier is reported only once for each function it appears in testsprite.c:40:9: warning: implicit declaration of function âSDL_DisplayFormatâ; did you mean âSDL_AllocFormatâ? [-Wimplicit-function-declaration] temp = SDL_DisplayFormat(sprite); ^~~~~~~~~~~~~~~~~ SDL_AllocFormat testsprite.c:40:7: warning: assignment to âSDL_Surface *â {aka âstruct SDL_Surface *â} from âintâ makes pointer from integer without a cast [-Wint-conversion] temp = SDL_DisplayFormat(sprite); ^ testsprite.c: In function âMoveSpritesâ: testsprite.c:80:25: error: âSDL_DOUBLEBUFâ undeclared (first use in this function); did you mean âSDL_DROPBEGINâ? if ( (screen->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF ) { ^~~~~~~~~~~~~ SDL_DROPBEGIN testsprite.c:94:3: warning: implicit declaration of function âSDL_Flipâ; did you mean âSDL_Quitâ? [-Wimplicit-function-declaration] SDL_Flip(screen); ^~~~~~~~ SDL_Quit testsprite.c:96:3: warning: implicit declaration of function âSDL_UpdateRectsâ; did you mean âSDL_UpdateTextureâ? [-Wimplicit-function-declaration] SDL_UpdateRects(screen, nupdates, sprite_rects); ^~~~~~~~~~~~~~~ SDL_UpdateTexture testsprite.c: In function âFastestFlagsâ: testsprite.c:103:8: error: unknown type name âSDL_VideoInfoâ const SDL_VideoInfo *info; ^~~~~~~~~~~~~ testsprite.c:105:11: error: âSDL_FULLSCREENâ undeclared (first use in this function); did you mean âSDL_USEREVENTâ? flags |= SDL_FULLSCREEN; ^~~~~~~~~~~~~~ SDL_USEREVENT testsprite.c:107:9: warning: implicit declaration of function âSDL_GetVideoInfoâ; did you mean âSDL_GetPowerInfoâ? [-Wimplicit-function-declaration] info = SDL_GetVideoInfo(); ^~~~~~~~~~~~~~~~ SDL_GetPowerInfo testsprite.c:107:7: warning: assignment to âconst int *â from âintâ makes pointer from integer without a cast [-Wint-conversion] info = SDL_GetVideoInfo(); ^ testsprite.c:108:11: error: request for member âblit_hw_CCâ in something not a structure or union if ( info->blit_hw_CC && info->blit_fill ) { ^~ testsprite.c:108:31: error: request for member âblit_fillâ in something not a structure or union if ( info->blit_hw_CC && info->blit_fill ) { ^~ testsprite.c:110:12: error: âSDL_HWSURFACEâ undeclared (first use in this function); did you mean âSDL_SWSURFACEâ? flags |= SDL_HWSURFACE; ^~~~~~~~~~~~~ SDL_SWSURFACE testsprite.c:119:12: error: request for member âvideo_memâ in something not a structure or union if ( info->video_mem*1024 > (height*width*bpp/8) ) { ^~ testsprite.c:120:13: error: âSDL_DOUBLEBUFâ undeclared (first use in this function); did you mean âSDL_DROPBEGINâ? flags |= SDL_DOUBLEBUF; ^~~~~~~~~~~~~ SDL_DROPBEGIN testsprite.c: In function âmainâ: testsprite.c:145:29: error: âSDL_ANYFORMATâ undeclared (first use in this function); did you mean âSDL_HINT_NORMALâ? videoflags = SDL_SWSURFACE|SDL_ANYFORMAT; ^~~~~~~~~~~~~ SDL_HINT_NORMAL testsprite.c:169:18: error: âSDL_HWSURFACEâ undeclared (first use in this function); did you mean âSDL_SWSURFACEâ? videoflags ^= SDL_HWSURFACE; ^~~~~~~~~~~~~ SDL_SWSURFACE testsprite.c:172:18: error: âSDL_DOUBLEBUFâ undeclared (first use in this function); did you mean âSDL_DROPBEGINâ? videoflags ^= SDL_DOUBLEBUF; ^~~~~~~~~~~~~ SDL_DROPBEGIN testsprite.c:178:18: error: âSDL_FULLSCREENâ undeclared (first use in this function); did you mean âSDL_USEREVENTâ? videoflags ^= SDL_FULLSCREEN; ^~~~~~~~~~~~~~ SDL_USEREVENT testsprite.c:190:11: warning: implicit declaration of function âSDL_SetVideoModeâ; did you mean âSDL_GetVideoDriverâ? [-Wimplicit-function-declaration] screen = SDL_SetVideoMode(width, height, video_bpp, videoflags); ^~~~~~~~~~~~~~~~ SDL_GetVideoDriver testsprite.c:190:9: warning: assignment to âSDL_Surface *â {aka âstruct SDL_Surface *â} from âintâ makes pointer from integer without a cast [-Wint-conversion] screen = SDL_SetVideoMode(width, height, video_bpp, videoflags); ^ testsprite.c:254:24: error: âSDL_HWACCELâ undeclared (first use in this function); did you mean âSDL_RLEACCELâ? if ( (sprite->flags & SDL_HWACCEL) == SDL_HWACCEL ) { ^~~~~~~~~~~ SDL_RLEACCEL testsprite.c:271:6: warning: implicit declaration of function âSDL_WarpMouseâ; did you mean âSDL_CaptureMouseâ? [-Wimplicit-function-declaration] SDL_WarpMouse(screen->w/2, screen->h/2); ^~~~~~~~~~~~~ SDL_CaptureMouse Almost certainly the wrong API.
View Attachment As Raw
Actions:
View
Attachments on
bug 24497
: 11268