# rpmdb/header_internal.c File Reference

`#include "system.h"`
`#include <header_internal.h>`
`#include "debug.h"`
Include dependency graph for header_internal.c:

Go to the source code of this file.

## Defines

#define | _RPMTAG_INTERNAL

## Functions

int | headerVerifyInfo (uint32_t il, uint32_t dl, const void *pev, void *iv, int negate)
| Perform simple sanity and range checks on header tag(s).

## Variables

int | rpm_typeAlign [16]
| Alignment needs (and sizeof scalars types) for internal rpm data types.

## Detailed Description

Definition in file header_internal.c.

## Define Documentation

#define _RPMTAG_INTERNAL

Definition at line 8 of file header_internal.c.

## Function Documentation

int headerVerifyInfo | ( | uint32_t | il,
|  | uint32_t | dl,
|  | const void * | pev,
|  | void * | iv,
|  | int | negate |
| ) |  |  |

Perform simple sanity and range checks on header tag(s).

Parameters:

  | il | no. of tags in header
  | dl | no. of bytes in header data.
  | pev | 1st element in tag array, big-endian
  | iv | failing (or last) tag element, host-endian
  | negate | negative offset expected?

Returns:
  -1 on success, otherwise failing tag element index

Definition at line 36 of file header_internal.c.

References entryInfo_s::count, hdrchkAlign, hdrchkData, hdrchkRange, hdrchkType, entryInfo_s::offset, RPM_UINT8_TYPE, entryInfo_s::tag, and entryInfo_s::type.

Referenced by headerCheck(), and rdSignature().

## Variable Documentation

int rpm_typeAlign[16]

Initial value:

      {
        1,
        1,
        1,
        2,
        4,
        8,
        1,
        1,
        1,
        1,
        0,
        0,
        0,
        0,
        0,
        0
    }

Alignment needs (and sizeof scalars types) for internal rpm data types.

Sanity check on data alignment for data type.

Definition at line 17 of file header_internal.c.