Bugzilla #1402: fix BigFont extension if SHM is compiled in but not
working. Does not access SHM and privates if the SHM syscall failed during extension initialization.
This commit is contained in:
parent
90ff3688cd
commit
908287adda
|
@ -471,13 +471,16 @@ ProcXF86BigfontQueryFont(
|
|||
|
||||
if (nCharInfos > 0) {
|
||||
#ifdef HAS_SHM
|
||||
pDesc = (ShmDescPtr) FontGetPrivate(pFont, FontShmdescIndex);
|
||||
if (!badSysCall)
|
||||
pDesc = (ShmDescPtr) FontGetPrivate(pFont, FontShmdescIndex);
|
||||
else
|
||||
pDesc = NULL;
|
||||
if (pDesc) {
|
||||
pCI = (xCharInfo *) pDesc->attach_addr;
|
||||
if (stuff_flags & XF86Bigfont_FLAGS_Shm)
|
||||
shmid = pDesc->shmid;
|
||||
} else {
|
||||
if (stuff_flags & XF86Bigfont_FLAGS_Shm)
|
||||
if (stuff_flags & XF86Bigfont_FLAGS_Shm && !badSysCall)
|
||||
pDesc = shmalloc(nCharInfos * sizeof(xCharInfo)
|
||||
+ sizeof(CARD32));
|
||||
if (pDesc) {
|
||||
|
@ -522,7 +525,7 @@ ProcXF86BigfontQueryFont(
|
|||
}
|
||||
}
|
||||
#ifdef HAS_SHM
|
||||
if (pDesc) {
|
||||
if (pDesc && !badSysCall) {
|
||||
*(CARD32 *)(pCI + nCharInfos) = signature;
|
||||
if (!FontSetPrivate(pFont, FontShmdescIndex, pDesc)) {
|
||||
shmdealloc(pDesc);
|
||||
|
|
Loading…
Reference in New Issue