summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5327167)
- Fix error checking in RtlAddAtomToAtomTable / RtlpCheckIntegerAtom.
svn path=/trunk/; revision=16998
{
LoValue = (USHORT)((ULONG)AtomName & 0xFFFF);
{
LoValue = (USHORT)((ULONG)AtomName & 0xFFFF);
- if (LoValue >= 0xC000)
- return FALSE;
-
if (LoValue == 0)
LoValue = 0xC000;
if (LoValue == 0)
LoValue = 0xC000;
BOOLEAN DeletePinned)
{
PRTL_ATOM_TABLE_ENTRY *CurrentBucket, *LastBucket;
BOOLEAN DeletePinned)
{
PRTL_ATOM_TABLE_ENTRY *CurrentBucket, *LastBucket;
- PRTL_ATOM_TABLE_ENTRY CurrentEntry, NextEntry;
+ PRTL_ATOM_TABLE_ENTRY CurrentEntry, NextEntry, *PtrEntry;
DPRINT("RtlEmptyAtomTable (AtomTable %p DeletePinned %x)\n",
AtomTable, DeletePinned);
DPRINT("RtlEmptyAtomTable (AtomTable %p DeletePinned %x)\n",
AtomTable, DeletePinned);
CurrentBucket++)
{
NextEntry = *CurrentBucket;
CurrentBucket++)
{
NextEntry = *CurrentBucket;
+ PtrEntry = CurrentBucket;
while (NextEntry != NULL)
{
CurrentEntry = NextEntry;
NextEntry = NextEntry->HashLink;
while (NextEntry != NULL)
{
CurrentEntry = NextEntry;
NextEntry = NextEntry->HashLink;
- RtlpFreeAtomHandle(AtomTable,
- CurrentEntry);
+ if (DeletePinned || !(CurrentEntry->Flags & RTL_ATOM_IS_PINNED))
+ {
+ *PtrEntry = NextEntry;
- RtlpFreeAtomTableEntry(CurrentEntry);
+ RtlpFreeAtomHandle(AtomTable,
+ CurrentEntry);
+
+ RtlpFreeAtomTableEntry(CurrentEntry);
+ }
+ else
+ {
+ PtrEntry = &CurrentEntry->HashLink;
+ }
else
{
/* The caller supplied an empty atom name! */
else
{
/* The caller supplied an empty atom name! */
- Status = STATUS_INVALID_PARAMETER;
+ Status = STATUS_OBJECT_NAME_INVALID;