X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Flib%2Frtl%2Fatom.c;h=1c643df3d95e410a7ae4f8949f5e0911c1ec97a6;hp=166b9796dd17a4afc7cb5bf6159d813d9d509a16;hb=cf56f16a98daf0e77976ac5d1f8173f3c053523a;hpb=f355909c070081567e6c9afc4635cff242483875;ds=sidebyside diff --git a/reactos/lib/rtl/atom.c b/reactos/lib/rtl/atom.c index 166b9796dd1..1c643df3d95 100644 --- a/reactos/lib/rtl/atom.c +++ b/reactos/lib/rtl/atom.c @@ -150,6 +150,9 @@ RtlCreateAtomTable(IN ULONG TableSize, return STATUS_SUCCESS; } + /* Use default if size was incorrect */ + if (TableSize <= 1) TableSize = 37; + /* allocate atom table */ Table = RtlpAllocAtomTable(((TableSize - 1) * sizeof(PRTL_ATOM_TABLE_ENTRY)) + sizeof(RTL_ATOM_TABLE)); @@ -507,27 +510,22 @@ RtlLookupAtomInAtomTable(IN PRTL_ATOM_TABLE AtomTable, } RtlpLockAtomTable(AtomTable); - Status = STATUS_OBJECT_NAME_NOT_FOUND; /* string atom */ Entry = RtlpHashAtomName(AtomTable, AtomName, &HashLink); - if (Entry != NULL) { Status = STATUS_SUCCESS; FoundAtom = (RTL_ATOM)Entry->Atom; } - RtlpUnlockAtomTable(AtomTable); - if (NT_SUCCESS(Status) && Atom != NULL) { *Atom = FoundAtom; } - return Status; }