Back to index

glibc  2.9
vprintf_chk.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include "../libio/libioP.h"

Go to the source code of this file.


int ___vprintf_chk (int flag, const char *format, va_list ap)

Function Documentation

int ___vprintf_chk ( int  flag,
const char *  format,
va_list  ap 

Definition at line 27 of file vprintf_chk.c.

  int done;

  _IO_acquire_lock_clear_flags2 (stdout);
  if (flag > 0)
    stdout->_flags2 |= _IO_FLAGS2_FORTIFY;

  done = vfprintf (stdout, format, ap);

  if (flag > 0)
    stdout->_flags2 &= ~_IO_FLAGS2_FORTIFY;
  _IO_release_lock (stdout);

  return done;