project
stringclasses 788
values | commit_id
stringlengths 6
81
| CVE ID
stringlengths 13
16
| CWE ID
stringclasses 126
values | func
stringlengths 14
482k
| vul
int8 0
1
|
---|---|---|---|---|---|
Chrome | 23803a58e481e464a787e4b2c461af9e62f03905 | NOT_APPLICABLE | NOT_APPLICABLE | bool NormalizeFilePath(const FilePath& path, FilePath* normalized_path) {
FilePath real_path_result;
if (!RealPath(path, &real_path_result))
return false;
stat_wrapper_t file_info;
if (CallStat(real_path_result.value().c_str(), &file_info) != 0 ||
S_ISDIR(file_info.st_mode))
return false;
*normalized_path = real_path_result;
return true;
}
| 0 |
sgminer | 910c36089940e81fb85c65b8e63dcd2fac71470c | NOT_APPLICABLE | NOT_APPLICABLE | void cgsleep_us_r(cgtimer_t *ts_start, int64_t us)
{
struct timespec ts_end;
us_to_timespec(&ts_end, us);
timeraddspec(&ts_end, ts_start);
nanosleep_abstime(&ts_end);
}
| 0 |
viabtc_exchange_server | 4a7c27bfe98f409623d4d857894d017ff0672cc9#diff-515c81af848352583bff286d6224875f | NOT_APPLICABLE | NOT_APPLICABLE | void nw_buf_shift(nw_buf *buf)
{
if (buf->rpos == buf->wpos) {
buf->rpos = buf->wpos = 0;
} else if (buf->rpos != 0) {
memmove(buf->data, buf->data + buf->rpos, buf->wpos - buf->rpos);
buf->wpos -= buf->rpos;
buf->rpos = 0;
}
}
| 0 |
gpac | 3b84ffcbacf144ce35650df958432f472b6483f8 | NOT_APPLICABLE | NOT_APPLICABLE | GF_Err gf_isom_set_adobe_protection(GF_ISOFile *the_file, u32 trackNumber, u32 desc_index, u32 scheme_type, u32 scheme_version, Bool is_selective_enc, char *metadata, u32 len)
{
GF_ProtectionSchemeInfoBox *sinf;
//setup generic protection
#ifndef GPAC_DISABLE_ISOM_WRITE
GF_Err e;
e = isom_set_protected_entry(the_file, trackNumber, desc_index, 1, 0, scheme_type, scheme_version, NULL, GF_FALSE, &sinf);
if (e) return e;
#else
return GF_NOT_SUPPORTED;
#endif
sinf->info->adkm = (GF_AdobeDRMKeyManagementSystemBox *)gf_isom_box_new_parent(&sinf->info->child_boxes, GF_ISOM_BOX_TYPE_ADKM);
if (!sinf->info->adkm) return GF_OUT_OF_MEM;
sinf->info->adkm->header = (GF_AdobeDRMHeaderBox *)gf_isom_box_new_parent(&sinf->info->adkm->child_boxes, GF_ISOM_BOX_TYPE_AHDR);
if (!sinf->info->adkm->header) return GF_OUT_OF_MEM;
sinf->info->adkm->header->std_enc_params = (GF_AdobeStdEncryptionParamsBox *)gf_isom_box_new_parent(& sinf->info->adkm->header->child_boxes, GF_ISOM_BOX_TYPE_APRM);
if (!sinf->info->adkm->header->std_enc_params) return GF_OUT_OF_MEM;
sinf->info->adkm->header->std_enc_params->enc_info = (GF_AdobeEncryptionInfoBox *)gf_isom_box_new_parent(&sinf->info->adkm->header->std_enc_params->child_boxes, GF_ISOM_BOX_TYPE_AEIB);
if (!sinf->info->adkm->header->std_enc_params->enc_info) return GF_OUT_OF_MEM;
sinf->info->adkm->header->std_enc_params->enc_info->enc_algo = (char *)gf_malloc(8*sizeof(char));
if (!sinf->info->adkm->header->std_enc_params->enc_info->enc_algo) return GF_OUT_OF_MEM;
strcpy(sinf->info->adkm->header->std_enc_params->enc_info->enc_algo, "AES-CBC");
sinf->info->adkm->header->std_enc_params->enc_info->key_length = 16;
sinf->info->adkm->header->std_enc_params->key_info = (GF_AdobeKeyInfoBox *)gf_isom_box_new_parent(&sinf->info->adkm->header->std_enc_params->child_boxes, GF_ISOM_BOX_TYPE_AKEY);
if (!sinf->info->adkm->header->std_enc_params->key_info) return GF_OUT_OF_MEM;
sinf->info->adkm->header->std_enc_params->key_info->params = (GF_AdobeFlashAccessParamsBox *)gf_isom_box_new_parent(&sinf->info->adkm->header->std_enc_params->key_info->child_boxes, GF_ISOM_BOX_TYPE_FLXS);
if (!sinf->info->adkm->header->std_enc_params->key_info->params) return GF_OUT_OF_MEM;
if (metadata && len) {
sinf->info->adkm->header->std_enc_params->key_info->params->metadata = (char *)gf_malloc((len+1)*sizeof(char));
if (!sinf->info->adkm->header->std_enc_params->key_info->params->metadata) return GF_OUT_OF_MEM;
strncpy(sinf->info->adkm->header->std_enc_params->key_info->params->metadata, metadata, len);
sinf->info->adkm->header->std_enc_params->key_info->params->metadata[len] = 0;
}
sinf->info->adkm->au_format = (GF_AdobeDRMAUFormatBox *)gf_isom_box_new_parent(&sinf->info->adkm->child_boxes, GF_ISOM_BOX_TYPE_ADAF);
if (!sinf->info->adkm->au_format) return GF_OUT_OF_MEM;
sinf->info->adkm->au_format->selective_enc = is_selective_enc ? 0x10 : 0x00;
sinf->info->adkm->au_format->IV_length = 16;
return GF_OK;
} | 0 |
ImageMagick | 3cbfb163cff9e5b8cdeace8312e9bfee810ed02b | NOT_APPLICABLE | NOT_APPLICABLE | static MagickOffsetType FxGCD(MagickOffsetType alpha,MagickOffsetType beta)
{
if (beta != 0)
return(FxGCD(beta,alpha % beta));
return(alpha);
}
| 0 |
linux | 594cc251fdd0d231d342d88b2fdff4bc42fb0690 | NOT_APPLICABLE | NOT_APPLICABLE | static void __unhash_process(struct task_struct *p, bool group_dead)
{
nr_threads--;
detach_pid(p, PIDTYPE_PID);
if (group_dead) {
detach_pid(p, PIDTYPE_TGID);
detach_pid(p, PIDTYPE_PGID);
detach_pid(p, PIDTYPE_SID);
list_del_rcu(&p->tasks);
list_del_init(&p->sibling);
__this_cpu_dec(process_counts);
}
list_del_rcu(&p->thread_group);
list_del_rcu(&p->thread_node);
} | 0 |
ImageMagick | 6790815c75bdea0357df5564345847856e995d6b | NOT_APPLICABLE | NOT_APPLICABLE | MagickExport const OptionInfo *GetCommandOptionInfo(const char *option)
{
register ssize_t
i;
for (i=0; CommandOptions[i].mnemonic != (char *) NULL; i++)
if (LocaleCompare(option,CommandOptions[i].mnemonic) == 0)
break;
return(CommandOptions+i);
} | 0 |
php | 1291d6bbee93b6109eb07e8f7916ff1b7fcc13e1 | NOT_APPLICABLE | NOT_APPLICABLE | PHP_FUNCTION(register_tick_function)
{
user_tick_function_entry tick_fe;
int i;
char *function_name = NULL;
tick_fe.calling = 0;
tick_fe.arg_count = ZEND_NUM_ARGS();
if (tick_fe.arg_count < 1) {
WRONG_PARAM_COUNT;
}
tick_fe.arguments = (zval **) safe_emalloc(sizeof(zval *), tick_fe.arg_count, 0);
if (zend_get_parameters_array(ht, tick_fe.arg_count, tick_fe.arguments) == FAILURE) {
efree(tick_fe.arguments);
RETURN_FALSE;
}
if (!zend_is_callable(tick_fe.arguments[0], 0, &function_name TSRMLS_CC)) {
efree(tick_fe.arguments);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid tick callback '%s' passed", function_name);
efree(function_name);
RETURN_FALSE;
} else if (function_name) {
efree(function_name);
}
if (Z_TYPE_P(tick_fe.arguments[0]) != IS_ARRAY && Z_TYPE_P(tick_fe.arguments[0]) != IS_OBJECT) {
convert_to_string_ex(&tick_fe.arguments[0]);
}
if (!BG(user_tick_functions)) {
BG(user_tick_functions) = (zend_llist *) emalloc(sizeof(zend_llist));
zend_llist_init(BG(user_tick_functions),
sizeof(user_tick_function_entry),
(llist_dtor_func_t) user_tick_function_dtor, 0);
php_add_tick_function(run_user_tick_functions);
}
for (i = 0; i < tick_fe.arg_count; i++) {
Z_ADDREF_P(tick_fe.arguments[i]);
}
zend_llist_add_element(BG(user_tick_functions), &tick_fe);
RETURN_TRUE;
}
| 0 |
Chrome | 4504a474c069d07104237d0c03bfce7b29a42de6 | NOT_APPLICABLE | NOT_APPLICABLE | TextTrackContainer& HTMLMediaElement::EnsureTextTrackContainer() {
ShadowRoot& shadow_root = EnsureUserAgentShadowRoot();
AssertShadowRootChildren(shadow_root);
Node* first_child = shadow_root.firstChild();
if (first_child && first_child->IsTextTrackContainer())
return ToTextTrackContainer(*first_child);
Node* to_be_inserted = first_child;
if (first_child && first_child->IsMediaRemotingInterstitial()) {
Node* second_child = first_child->nextSibling();
if (second_child && second_child->IsTextTrackContainer())
return ToTextTrackContainer(*second_child);
to_be_inserted = second_child;
}
TextTrackContainer* text_track_container = TextTrackContainer::Create(*this);
shadow_root.InsertBefore(text_track_container, to_be_inserted);
AssertShadowRootChildren(shadow_root);
return *text_track_container;
}
| 0 |
linux-2.6 | 09384dfc76e526c3993c09c42e016372dc9dd22c | NOT_APPLICABLE | NOT_APPLICABLE | static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name)
{
discinfo_t *discoveries; /* Copy of the discovery log */
int number; /* Number of nodes in the log */
int i;
int err = -ENETUNREACH;
__u32 daddr = DEV_ADDR_ANY; /* Address we found the service on */
__u8 dtsap_sel = 0x0; /* TSAP associated with it */
IRDA_DEBUG(2, "%s(), name=%s\n", __func__, name);
/* Ask lmp for the current discovery log
* Note : we have to use irlmp_get_discoveries(), as opposed
* to play with the cachelog directly, because while we are
* making our ias query, le log might change... */
discoveries = irlmp_get_discoveries(&number, self->mask.word,
self->nslots);
/* Check if the we got some results */
if (discoveries == NULL)
return -ENETUNREACH; /* No nodes discovered */
/*
* Now, check all discovered devices (if any), and connect
* client only about the services that the client is
* interested in...
*/
for(i = 0; i < number; i++) {
/* Try the address in the log */
self->daddr = discoveries[i].daddr;
self->saddr = 0x0;
IRDA_DEBUG(1, "%s(), trying daddr = %08x\n",
__func__, self->daddr);
/* Query remote LM-IAS for this service */
err = irda_find_lsap_sel(self, name);
switch (err) {
case 0:
/* We found the requested service */
if(daddr != DEV_ADDR_ANY) {
IRDA_DEBUG(1, "%s(), discovered service ''%s'' in two different devices !!!\n",
__func__, name);
self->daddr = DEV_ADDR_ANY;
kfree(discoveries);
return(-ENOTUNIQ);
}
/* First time we found that one, save it ! */
daddr = self->daddr;
dtsap_sel = self->dtsap_sel;
break;
case -EADDRNOTAVAIL:
/* Requested service simply doesn't exist on this node */
break;
default:
/* Something bad did happen :-( */
IRDA_DEBUG(0, "%s(), unexpected IAS query failure\n", __func__);
self->daddr = DEV_ADDR_ANY;
kfree(discoveries);
return(-EHOSTUNREACH);
break;
}
}
/* Cleanup our copy of the discovery log */
kfree(discoveries);
/* Check out what we found */
if(daddr == DEV_ADDR_ANY) {
IRDA_DEBUG(1, "%s(), cannot discover service ''%s'' in any device !!!\n",
__func__, name);
self->daddr = DEV_ADDR_ANY;
return(-EADDRNOTAVAIL);
}
/* Revert back to discovered device & service */
self->daddr = daddr;
self->saddr = 0x0;
self->dtsap_sel = dtsap_sel;
IRDA_DEBUG(1, "%s(), discovered requested service ''%s'' at address %08x\n",
__func__, name, self->daddr);
return 0;
} | 0 |
linux | 208c72f4fe44fe09577e7975ba0e7fa0278f3d03 | NOT_APPLICABLE | NOT_APPLICABLE | static int nl80211_tx_mgmt_cancel_wait(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct net_device *dev = info->user_ptr[1];
u64 cookie;
if (!info->attrs[NL80211_ATTR_COOKIE])
return -EINVAL;
if (!rdev->ops->mgmt_tx_cancel_wait)
return -EOPNOTSUPP;
if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_STATION &&
dev->ieee80211_ptr->iftype != NL80211_IFTYPE_ADHOC &&
dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_CLIENT &&
dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP_VLAN &&
dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO)
return -EOPNOTSUPP;
cookie = nla_get_u64(info->attrs[NL80211_ATTR_COOKIE]);
return rdev->ops->mgmt_tx_cancel_wait(&rdev->wiphy, dev, cookie);
}
| 0 |
Chrome | e13eb21898c7eba584f680e3d17ca1b9e28bc505 | NOT_APPLICABLE | NOT_APPLICABLE | bool UnpackAPIPermissions(const std::vector<std::string>& permissions_input,
const PermissionSet& required_permissions,
const PermissionSet& optional_permissions,
UnpackPermissionSetResult* result,
std::string* error) {
PermissionsInfo* info = PermissionsInfo::GetInstance();
APIPermissionSet apis;
for (const auto& permission_str : permissions_input) {
size_t delimiter = permission_str.find(kDelimiter);
if (delimiter != std::string::npos) {
base::StringPiece permission_piece(permission_str);
std::unique_ptr<APIPermission> permission = UnpackPermissionWithArguments(
permission_piece.substr(0, delimiter),
permission_piece.substr(delimiter + 1), permission_str, error);
if (!permission)
return false;
apis.insert(std::move(permission));
} else {
const APIPermissionInfo* permission_info =
info->GetByName(permission_str);
if (!permission_info) {
*error = ErrorUtils::FormatErrorMessage(kUnknownPermissionError,
permission_str);
return false;
}
apis.insert(permission_info->id());
}
}
for (const auto* api_permission : apis) {
if (required_permissions.apis().count(api_permission->id())) {
result->required_apis.insert(api_permission->id());
continue;
}
if (!optional_permissions.apis().count(api_permission->id())) {
result->unlisted_apis.insert(api_permission->id());
continue;
}
if (!api_permission->info()->supports_optional()) {
result->unsupported_optional_apis.insert(api_permission->id());
continue;
}
result->optional_apis.insert(api_permission->id());
}
return true;
}
| 0 |
FreeRDP | 6b485b146a1b9d6ce72dfd7b5f36456c166e7a16 | NOT_APPLICABLE | NOT_APPLICABLE | static wStream* rdg_build_http_request(rdpRdg* rdg, const char* method,
const char* transferEncoding)
{
wStream* s = NULL;
HttpRequest* request = NULL;
const char* uri;
if (!rdg || !method)
return NULL;
uri = http_context_get_uri(rdg->http);
request = http_request_new();
if (!request)
return NULL;
if (!http_request_set_method(request, method) || !http_request_set_uri(request, uri))
goto out;
if (rdg->ntlm)
{
if (!rdg_set_ntlm_auth_header(rdg->ntlm, request))
goto out;
}
if (transferEncoding)
{
http_request_set_transfer_encoding(request, transferEncoding);
}
s = http_request_write(rdg->http, request);
out:
http_request_free(request);
if (s)
Stream_SealLength(s);
return s;
} | 0 |
linux | d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978 | NOT_APPLICABLE | NOT_APPLICABLE | static void __net_exit sit_exit_net(struct net *net)
{
struct sit_net *sitn = net_generic(net, sit_net_id);
LIST_HEAD(list);
rtnl_lock();
sit_destroy_tunnels(sitn, &list);
unregister_netdevice_queue(sitn->fb_tunnel_dev, &list);
unregister_netdevice_many(&list);
rtnl_unlock();
}
| 0 |
libvncserver | a6788d1da719ae006605b78d22f5a9f170b423af | NOT_APPLICABLE | NOT_APPLICABLE | rfbScreenInfoPtr rfbScalingFind(rfbClientPtr cl, int width, int height)
{
rfbScreenInfoPtr ptr;
/* include the original in the search (ie: fine 1:1 scaled version of the frameBuffer) */
for (ptr=cl->screen; ptr!=NULL; ptr=ptr->scaledScreenNext)
{
if ((ptr->width==width) && (ptr->height==height))
return ptr;
}
return NULL;
} | 0 |
linux | 189b0ddc245139af81198d1a3637cac74f96e13a | NOT_APPLICABLE | NOT_APPLICABLE | static inline bool pipe_writable(const struct pipe_inode_info *pipe)
{
unsigned int head = READ_ONCE(pipe->head);
unsigned int tail = READ_ONCE(pipe->tail);
unsigned int max_usage = READ_ONCE(pipe->max_usage);
return !pipe_full(head, tail, max_usage) ||
!READ_ONCE(pipe->readers);
} | 0 |
tidy-html5 | c18f27a58792f7fbd0b30a0ff50d6b40a82f940d | NOT_APPLICABLE | NOT_APPLICABLE | static ctmbstr GetNameFromVers(uint vers)
{
uint i;
for (i = 0; W3C_Doctypes[i].name; ++i)
if (W3C_Doctypes[i].vers == vers)
return W3C_Doctypes[i].name;
return NULL;
} | 0 |
v4l2loopback | 64a216af4c09c9ba9326057d7e78994271827eff | NOT_APPLICABLE | NOT_APPLICABLE | static int vidioc_querycap(struct file *file, void *priv, struct v4l2_capability *cap)
{
struct v4l2_loopback_device *dev = v4l2loopback_getdevice(file);
int devnr = ((struct v4l2loopback_private *)video_get_drvdata(dev->vdev))->devicenr;
__u32 capabilities = V4L2_CAP_STREAMING | V4L2_CAP_READWRITE;
strlcpy(cap->driver, "v4l2 loopback", sizeof(cap->driver));
vidioc_fill_name(cap->card, sizeof(cap->card), devnr);
snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:v4l2loopback-%03d", devnr);
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0)
/* since 3.1.0, the v4l2-core system is supposed to set the version */
cap->version = V4L2LOOPBACK_VERSION_CODE;
#endif
#ifdef V4L2_CAP_VIDEO_M2M
capabilities |= V4L2_CAP_VIDEO_M2M;
#endif /* V4L2_CAP_VIDEO_M2M */
if (dev->announce_all_caps) {
capabilities |= V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT;
} else {
if (dev->ready_for_capture) {
capabilities |= V4L2_CAP_VIDEO_CAPTURE;
}
if (dev->ready_for_output) {
capabilities |= V4L2_CAP_VIDEO_OUTPUT;
}
}
dev->vdev->device_caps = cap->device_caps = cap->capabilities = capabilities;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)
cap->capabilities |= V4L2_CAP_DEVICE_CAPS;
#endif
memset(cap->reserved, 0, sizeof(cap->reserved));
return 0;
} | 0 |
Chrome | f197c1c2b441da15274e2c17a928d7760b0bb260 | NOT_APPLICABLE | NOT_APPLICABLE | RendererBlinkPlatformImplTestOverride() {
InitializeMojo();
}
| 0 |
ImageMagick | 94174beff065cb5683d09d79e992c3ebbdead311 | NOT_APPLICABLE | NOT_APPLICABLE | MagickExport Image *MorphImages(const Image *image,const size_t number_frames,
ExceptionInfo *exception)
{
#define MorphImageTag "Morph/Image"
double
alpha,
beta;
Image
*morph_image,
*morph_images;
MagickBooleanType
status;
MagickOffsetType
scene;
const Image
*next;
ssize_t
n;
ssize_t
y;
/*
Clone first frame in sequence.
*/
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
assert(exception != (ExceptionInfo *) NULL);
assert(exception->signature == MagickCoreSignature);
morph_images=CloneImage(image,0,0,MagickTrue,exception);
if (morph_images == (Image *) NULL)
return((Image *) NULL);
if (GetNextImageInList(image) == (Image *) NULL)
{
/*
Morph single image.
*/
for (n=1; n < (ssize_t) number_frames; n++)
{
morph_image=CloneImage(image,0,0,MagickTrue,exception);
if (morph_image == (Image *) NULL)
{
morph_images=DestroyImageList(morph_images);
return((Image *) NULL);
}
AppendImageToList(&morph_images,morph_image);
if (image->progress_monitor != (MagickProgressMonitor) NULL)
{
MagickBooleanType
proceed;
proceed=SetImageProgress(image,MorphImageTag,(MagickOffsetType) n,
number_frames);
if (proceed == MagickFalse)
status=MagickFalse;
}
}
return(GetFirstImageInList(morph_images));
}
/*
Morph image sequence.
*/
status=MagickTrue;
scene=0;
next=image;
for ( ; GetNextImageInList(next) != (Image *) NULL; next=GetNextImageInList(next))
{
for (n=0; n < (ssize_t) number_frames; n++)
{
CacheView
*image_view,
*morph_view;
beta=(double) (n+1.0)/(double) (number_frames+1.0);
alpha=1.0-beta;
morph_image=ResizeImage(next,(size_t) (alpha*next->columns+beta*
GetNextImageInList(next)->columns+0.5),(size_t) (alpha*next->rows+beta*
GetNextImageInList(next)->rows+0.5),next->filter,exception);
if (morph_image == (Image *) NULL)
{
morph_images=DestroyImageList(morph_images);
return((Image *) NULL);
}
status=SetImageStorageClass(morph_image,DirectClass,exception);
if (status == MagickFalse)
{
morph_image=DestroyImage(morph_image);
return((Image *) NULL);
}
AppendImageToList(&morph_images,morph_image);
morph_images=GetLastImageInList(morph_images);
morph_image=ResizeImage(GetNextImageInList(next),morph_images->columns,
morph_images->rows,GetNextImageInList(next)->filter,exception);
if (morph_image == (Image *) NULL)
{
morph_images=DestroyImageList(morph_images);
return((Image *) NULL);
}
image_view=AcquireVirtualCacheView(morph_image,exception);
morph_view=AcquireAuthenticCacheView(morph_images,exception);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(static) shared(status) \
magick_number_threads(morph_image,morph_image,morph_image->rows,1)
#endif
for (y=0; y < (ssize_t) morph_images->rows; y++)
{
MagickBooleanType
sync;
const Quantum
*magick_restrict p;
ssize_t
x;
Quantum
*magick_restrict q;
if (status == MagickFalse)
continue;
p=GetCacheViewVirtualPixels(image_view,0,y,morph_image->columns,1,
exception);
q=GetCacheViewAuthenticPixels(morph_view,0,y,morph_images->columns,1,
exception);
if ((p == (const Quantum *) NULL) || (q == (Quantum *) NULL))
{
status=MagickFalse;
continue;
}
for (x=0; x < (ssize_t) morph_images->columns; x++)
{
ssize_t
i;
for (i=0; i < (ssize_t) GetPixelChannels(morph_image); i++)
{
PixelChannel channel = GetPixelChannelChannel(morph_image,i);
PixelTrait traits = GetPixelChannelTraits(morph_image,channel);
PixelTrait morph_traits=GetPixelChannelTraits(morph_images,channel);
if ((traits == UndefinedPixelTrait) ||
(morph_traits == UndefinedPixelTrait))
continue;
if ((morph_traits & CopyPixelTrait) != 0)
{
SetPixelChannel(morph_image,channel,p[i],q);
continue;
}
SetPixelChannel(morph_image,channel,ClampToQuantum(alpha*
GetPixelChannel(morph_images,channel,q)+beta*p[i]),q);
}
p+=GetPixelChannels(morph_image);
q+=GetPixelChannels(morph_images);
}
sync=SyncCacheViewAuthenticPixels(morph_view,exception);
if (sync == MagickFalse)
status=MagickFalse;
}
morph_view=DestroyCacheView(morph_view);
image_view=DestroyCacheView(image_view);
morph_image=DestroyImage(morph_image);
}
if (n < (ssize_t) number_frames)
break;
/*
Clone last frame in sequence.
*/
morph_image=CloneImage(GetNextImageInList(next),0,0,MagickTrue,exception);
if (morph_image == (Image *) NULL)
{
morph_images=DestroyImageList(morph_images);
return((Image *) NULL);
}
AppendImageToList(&morph_images,morph_image);
morph_images=GetLastImageInList(morph_images);
if (image->progress_monitor != (MagickProgressMonitor) NULL)
{
MagickBooleanType
proceed;
proceed=SetImageProgress(image,MorphImageTag,scene,
GetImageListLength(image));
if (proceed == MagickFalse)
status=MagickFalse;
}
scene++;
}
if (GetNextImageInList(next) != (Image *) NULL)
{
morph_images=DestroyImageList(morph_images);
return((Image *) NULL);
}
return(GetFirstImageInList(morph_images));
} | 0 |
linux-2.6 | 89f5b7da2a6bad2e84670422ab8192382a5aeb9f | NOT_APPLICABLE | NOT_APPLICABLE | static __init int vdso_fixup_datapage(struct lib32_elfinfo *v32,
struct lib64_elfinfo *v64)
{
Elf32_Sym *sym32;
#ifdef CONFIG_PPC64
Elf64_Sym *sym64;
sym64 = find_symbol64(v64, "__kernel_datapage_offset");
if (sym64 == NULL) {
printk(KERN_ERR "vDSO64: Can't find symbol "
"__kernel_datapage_offset !\n");
return -1;
}
*((int *)(vdso64_kbase + sym64->st_value - VDSO64_LBASE)) =
(vdso64_pages << PAGE_SHIFT) -
(sym64->st_value - VDSO64_LBASE);
#endif /* CONFIG_PPC64 */
sym32 = find_symbol32(v32, "__kernel_datapage_offset");
if (sym32 == NULL) {
printk(KERN_ERR "vDSO32: Can't find symbol "
"__kernel_datapage_offset !\n");
return -1;
}
*((int *)(vdso32_kbase + (sym32->st_value - VDSO32_LBASE))) =
(vdso32_pages << PAGE_SHIFT) -
(sym32->st_value - VDSO32_LBASE);
return 0;
} | 0 |
oniguruma | 166a6c3999bf06b4de0ab4ce6b088a468cc4029f | NOT_APPLICABLE | NOT_APPLICABLE | unicode_unfold_key(OnigCodePoint code)
{
static const struct ByUnfoldKey wordlist[] =
{
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0},
{0x1040a, 3267, 1},
{0x1e0a, 1727, 1},
{0x040a, 1016, 1},
{0x010a, 186, 1},
{0x1f0a, 2088, 1},
{0x2c0a, 2451, 1},
{0x0189, 619, 1},
{0x1f89, 134, 2},
{0x1f85, 154, 2},
{0x0389, 733, 1},
{0x03ff, 724, 1},
{0xab89, 1523, 1},
{0xab85, 1511, 1},
{0x10c89, 3384, 1},
{0x10c85, 3372, 1},
{0x1e84, 1911, 1},
{0x03f5, 752, 1},
{0x0184, 360, 1},
{0x1f84, 149, 2},
{0x2c84, 2592, 1},
{0x017d, 351, 1},
{0x1ff3, 96, 2},
{0xab84, 1508, 1},
{0xa784, 3105, 1},
{0x10c84, 3369, 1},
{0xab7d, 1487, 1},
{0xa77d, 1706, 1},
{0x1e98, 38, 2},
{0x0498, 1106, 1},
{0x0198, 375, 1},
{0x1f98, 169, 2},
{0x2c98, 2622, 1},
{0x0398, 762, 1},
{0xa684, 2940, 1},
{0xab98, 1568, 1},
{0xa798, 3123, 1},
{0x10c98, 3429, 1},
{0x050a, 1277, 1},
{0x1ffb, 2265, 1},
{0x1e96, 16, 2},
{0x0496, 1103, 1},
{0x0196, 652, 1},
{0x1f96, 199, 2},
{0x2c96, 2619, 1},
{0x0396, 756, 1},
{0xa698, 2970, 1},
{0xab96, 1562, 1},
{0xa796, 3120, 1},
{0x10c96, 3423, 1},
{0x1feb, 2259, 1},
{0x2ceb, 2736, 1},
{0x1e90, 1929, 1},
{0x0490, 1094, 1},
{0x0190, 628, 1},
{0x1f90, 169, 2},
{0x2c90, 2610, 1},
{0x0390, 25, 3},
{0xa696, 2967, 1},
{0xab90, 1544, 1},
{0xa790, 3114, 1},
{0x10c90, 3405, 1},
{0x01d7, 444, 1},
{0x1fd7, 31, 3},
{0x1ea6, 1947, 1},
{0x04a6, 1127, 1},
{0x01a6, 676, 1},
{0x1fa6, 239, 2},
{0x2ca6, 2643, 1},
{0x03a6, 810, 1},
{0xa690, 2958, 1},
{0xaba6, 1610, 1},
{0xa7a6, 3144, 1},
{0x10ca6, 3471, 1},
{0x1ea4, 1944, 1},
{0x04a4, 1124, 1},
{0x01a4, 390, 1},
{0x1fa4, 229, 2},
{0x2ca4, 2640, 1},
{0x03a4, 804, 1},
{0x10a6, 2763, 1},
{0xaba4, 1604, 1},
{0xa7a4, 3141, 1},
{0x10ca4, 3465, 1},
{0x1ea0, 1938, 1},
{0x04a0, 1118, 1},
{0x01a0, 384, 1},
{0x1fa0, 209, 2},
{0x2ca0, 2634, 1},
{0x03a0, 792, 1},
{0x10a4, 2757, 1},
{0xaba0, 1592, 1},
{0xa7a0, 3135, 1},
{0x10ca0, 3453, 1},
{0x1eb2, 1965, 1},
{0x04b2, 1145, 1},
{0x01b2, 694, 1},
{0x1fb2, 249, 2},
{0x2cb2, 2661, 1},
{0x03fd, 718, 1},
{0x10a0, 2745, 1},
{0xabb2, 1646, 1},
{0xa7b2, 703, 1},
{0x10cb2, 3507, 1},
{0x1eac, 1956, 1},
{0x04ac, 1136, 1},
{0x01ac, 396, 1},
{0x1fac, 229, 2},
{0x2cac, 2652, 1},
{0x0537, 1352, 1},
{0x10b2, 2799, 1},
{0xabac, 1628, 1},
{0xa7ac, 637, 1},
{0x10cac, 3489, 1},
{0x1eaa, 1953, 1},
{0x04aa, 1133, 1},
{0x00dd, 162, 1},
{0x1faa, 219, 2},
{0x2caa, 2649, 1},
{0x03aa, 824, 1},
{0x10ac, 2781, 1},
{0xabaa, 1622, 1},
{0xa7aa, 646, 1},
{0x10caa, 3483, 1},
{0x1ea8, 1950, 1},
{0x04a8, 1130, 1},
{0x020a, 517, 1},
{0x1fa8, 209, 2},
{0x2ca8, 2646, 1},
{0x03a8, 817, 1},
{0x10aa, 2775, 1},
{0xaba8, 1616, 1},
{0xa7a8, 3147, 1},
{0x10ca8, 3477, 1},
{0x1ea2, 1941, 1},
{0x04a2, 1121, 1},
{0x01a2, 387, 1},
{0x1fa2, 219, 2},
{0x2ca2, 2637, 1},
{0x118a6, 3528, 1},
{0x10a8, 2769, 1},
{0xaba2, 1598, 1},
{0xa7a2, 3138, 1},
{0x10ca2, 3459, 1},
{0x2ced, 2739, 1},
{0x1fe9, 2283, 1},
{0x1fe7, 47, 3},
{0x1eb0, 1962, 1},
{0x04b0, 1142, 1},
{0x118a4, 3522, 1},
{0x10a2, 2751, 1},
{0x2cb0, 2658, 1},
{0x03b0, 41, 3},
{0x1fe3, 41, 3},
{0xabb0, 1640, 1},
{0xa7b0, 706, 1},
{0x10cb0, 3501, 1},
{0x01d9, 447, 1},
{0x1fd9, 2277, 1},
{0x118a0, 3510, 1},
{0x00df, 24, 2},
{0x00d9, 150, 1},
{0xab77, 1469, 1},
{0x10b0, 2793, 1},
{0x1eae, 1959, 1},
{0x04ae, 1139, 1},
{0x01ae, 685, 1},
{0x1fae, 239, 2},
{0x2cae, 2655, 1},
{0x118b2, 3564, 1},
{0xab73, 1457, 1},
{0xabae, 1634, 1},
{0xab71, 1451, 1},
{0x10cae, 3495, 1},
{0x1e2a, 1775, 1},
{0x042a, 968, 1},
{0x012a, 234, 1},
{0x1f2a, 2130, 1},
{0x2c2a, 2547, 1},
{0x118ac, 3546, 1},
{0x10ae, 2787, 1},
{0x0535, 1346, 1},
{0xa72a, 2988, 1},
{0x1e9a, 0, 2},
{0x049a, 1109, 1},
{0xff37, 3225, 1},
{0x1f9a, 179, 2},
{0x2c9a, 2625, 1},
{0x039a, 772, 1},
{0x118aa, 3540, 1},
{0xab9a, 1574, 1},
{0xa79a, 3126, 1},
{0x10c9a, 3435, 1},
{0x1e94, 1935, 1},
{0x0494, 1100, 1},
{0x0194, 640, 1},
{0x1f94, 189, 2},
{0x2c94, 2616, 1},
{0x0394, 749, 1},
{0x118a8, 3534, 1},
{0xab94, 1556, 1},
{0xa69a, 2973, 1},
{0x10c94, 3417, 1},
{0x10402, 3243, 1},
{0x1e02, 1715, 1},
{0x0402, 992, 1},
{0x0102, 174, 1},
{0x0533, 1340, 1},
{0x2c02, 2427, 1},
{0x118a2, 3516, 1},
{0x052a, 1325, 1},
{0xa694, 2964, 1},
{0x1e92, 1932, 1},
{0x0492, 1097, 1},
{0x2165, 2307, 1},
{0x1f92, 179, 2},
{0x2c92, 2613, 1},
{0x0392, 742, 1},
{0x2161, 2295, 1},
{0xab92, 1550, 1},
{0xa792, 3117, 1},
{0x10c92, 3411, 1},
{0x118b0, 3558, 1},
{0x1f5f, 2199, 1},
{0x1e8e, 1926, 1},
{0x048e, 1091, 1},
{0x018e, 453, 1},
{0x1f8e, 159, 2},
{0x2c8e, 2607, 1},
{0x038e, 833, 1},
{0xa692, 2961, 1},
{0xab8e, 1538, 1},
{0x0055, 59, 1},
{0x10c8e, 3399, 1},
{0x1f5d, 2196, 1},
{0x212a, 27, 1},
{0x04cb, 1181, 1},
{0x01cb, 425, 1},
{0x1fcb, 2241, 1},
{0x118ae, 3552, 1},
{0x0502, 1265, 1},
{0x00cb, 111, 1},
{0xa68e, 2955, 1},
{0x1e8a, 1920, 1},
{0x048a, 1085, 1},
{0x018a, 622, 1},
{0x1f8a, 139, 2},
{0x2c8a, 2601, 1},
{0x038a, 736, 1},
{0x2c67, 2571, 1},
{0xab8a, 1526, 1},
{0x1e86, 1914, 1},
{0x10c8a, 3387, 1},
{0x0186, 616, 1},
{0x1f86, 159, 2},
{0x2c86, 2595, 1},
{0x0386, 727, 1},
{0xff35, 3219, 1},
{0xab86, 1514, 1},
{0xa786, 3108, 1},
{0x10c86, 3375, 1},
{0xa68a, 2949, 1},
{0x0555, 1442, 1},
{0x1ebc, 1980, 1},
{0x04bc, 1160, 1},
{0x01bc, 411, 1},
{0x1fbc, 62, 2},
{0x2cbc, 2676, 1},
{0x1f5b, 2193, 1},
{0xa686, 2943, 1},
{0xabbc, 1676, 1},
{0x1eb8, 1974, 1},
{0x04b8, 1154, 1},
{0x01b8, 408, 1},
{0x1fb8, 2268, 1},
{0x2cb8, 2670, 1},
{0x01db, 450, 1},
{0x1fdb, 2247, 1},
{0xabb8, 1664, 1},
{0x10bc, 2829, 1},
{0x00db, 156, 1},
{0x1eb6, 1971, 1},
{0x04b6, 1151, 1},
{0xff33, 3213, 1},
{0x1fb6, 58, 2},
{0x2cb6, 2667, 1},
{0xff2a, 3186, 1},
{0x10b8, 2817, 1},
{0xabb6, 1658, 1},
{0xa7b6, 3153, 1},
{0x10426, 3351, 1},
{0x1e26, 1769, 1},
{0x0426, 956, 1},
{0x0126, 228, 1},
{0x0053, 52, 1},
{0x2c26, 2535, 1},
{0x0057, 65, 1},
{0x10b6, 2811, 1},
{0x022a, 562, 1},
{0xa726, 2982, 1},
{0x1e2e, 1781, 1},
{0x042e, 980, 1},
{0x012e, 240, 1},
{0x1f2e, 2142, 1},
{0x2c2e, 2559, 1},
{0xffffffff, -1, 0},
{0x2167, 2313, 1},
{0xffffffff, -1, 0},
{0xa72e, 2994, 1},
{0x1e2c, 1778, 1},
{0x042c, 974, 1},
{0x012c, 237, 1},
{0x1f2c, 2136, 1},
{0x2c2c, 2553, 1},
{0x1f6f, 2223, 1},
{0x2c6f, 604, 1},
{0xabbf, 1685, 1},
{0xa72c, 2991, 1},
{0x1e28, 1772, 1},
{0x0428, 962, 1},
{0x0128, 231, 1},
{0x1f28, 2124, 1},
{0x2c28, 2541, 1},
{0xffffffff, -1, 0},
{0x0553, 1436, 1},
{0x10bf, 2838, 1},
{0xa728, 2985, 1},
{0x0526, 1319, 1},
{0x0202, 505, 1},
{0x1e40, 1808, 1},
{0x10424, 3345, 1},
{0x1e24, 1766, 1},
{0x0424, 950, 1},
{0x0124, 225, 1},
{0xffffffff, -1, 0},
{0x2c24, 2529, 1},
{0x052e, 1331, 1},
{0xa740, 3018, 1},
{0x118bc, 3594, 1},
{0xa724, 2979, 1},
{0x1ef2, 2061, 1},
{0x04f2, 1241, 1},
{0x01f2, 483, 1},
{0x1ff2, 257, 2},
{0x2cf2, 2742, 1},
{0x052c, 1328, 1},
{0x118b8, 3582, 1},
{0xa640, 2865, 1},
{0x10422, 3339, 1},
{0x1e22, 1763, 1},
{0x0422, 944, 1},
{0x0122, 222, 1},
{0x2126, 820, 1},
{0x2c22, 2523, 1},
{0x0528, 1322, 1},
{0x01f1, 483, 1},
{0x118b6, 3576, 1},
{0xa722, 2976, 1},
{0x03f1, 796, 1},
{0x1ebe, 1983, 1},
{0x04be, 1163, 1},
{0xfb02, 12, 2},
{0x1fbe, 767, 1},
{0x2cbe, 2679, 1},
{0x01b5, 405, 1},
{0x0540, 1379, 1},
{0xabbe, 1682, 1},
{0x0524, 1316, 1},
{0x00b5, 779, 1},
{0xabb5, 1655, 1},
{0x1eba, 1977, 1},
{0x04ba, 1157, 1},
{0x216f, 2337, 1},
{0x1fba, 2226, 1},
{0x2cba, 2673, 1},
{0x10be, 2835, 1},
{0x0051, 46, 1},
{0xabba, 1670, 1},
{0x10b5, 2808, 1},
{0x1e6e, 1878, 1},
{0x046e, 1055, 1},
{0x016e, 330, 1},
{0x1f6e, 2220, 1},
{0x2c6e, 664, 1},
{0x118bf, 3603, 1},
{0x0522, 1313, 1},
{0x10ba, 2823, 1},
{0xa76e, 3087, 1},
{0x1eb4, 1968, 1},
{0x04b4, 1148, 1},
{0x2c75, 2583, 1},
{0x1fb4, 50, 2},
{0x2cb4, 2664, 1},
{0xab75, 1463, 1},
{0x1ec2, 1989, 1},
{0xabb4, 1652, 1},
{0xa7b4, 3150, 1},
{0x1fc2, 253, 2},
{0x2cc2, 2685, 1},
{0x03c2, 800, 1},
{0x00c2, 83, 1},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xff26, 3174, 1},
{0x10b4, 2805, 1},
{0x1eca, 2001, 1},
{0x0551, 1430, 1},
{0x01ca, 425, 1},
{0x1fca, 2238, 1},
{0x2cca, 2697, 1},
{0x10c2, 2847, 1},
{0x00ca, 108, 1},
{0xff2e, 3198, 1},
{0x1e8c, 1923, 1},
{0x048c, 1088, 1},
{0x0226, 556, 1},
{0x1f8c, 149, 2},
{0x2c8c, 2604, 1},
{0x038c, 830, 1},
{0xffffffff, -1, 0},
{0xab8c, 1532, 1},
{0xff2c, 3192, 1},
{0x10c8c, 3393, 1},
{0x1ec4, 1992, 1},
{0x022e, 568, 1},
{0x01c4, 417, 1},
{0x1fc4, 54, 2},
{0x2cc4, 2688, 1},
{0xffffffff, -1, 0},
{0x00c4, 89, 1},
{0xff28, 3180, 1},
{0xa68c, 2952, 1},
{0x01cf, 432, 1},
{0x022c, 565, 1},
{0x118be, 3600, 1},
{0x03cf, 839, 1},
{0x00cf, 123, 1},
{0x118b5, 3573, 1},
{0xffffffff, -1, 0},
{0x10c4, 2853, 1},
{0x216e, 2334, 1},
{0x24cb, 2406, 1},
{0x0228, 559, 1},
{0xff24, 3168, 1},
{0xffffffff, -1, 0},
{0x118ba, 3588, 1},
{0x1efe, 2079, 1},
{0x04fe, 1259, 1},
{0x01fe, 499, 1},
{0x1e9e, 24, 2},
{0x049e, 1115, 1},
{0x03fe, 721, 1},
{0x1f9e, 199, 2},
{0x2c9e, 2631, 1},
{0x039e, 786, 1},
{0x0224, 553, 1},
{0xab9e, 1586, 1},
{0xa79e, 3132, 1},
{0x10c9e, 3447, 1},
{0x01f7, 414, 1},
{0x1ff7, 67, 3},
{0xff22, 3162, 1},
{0x03f7, 884, 1},
{0x118b4, 3570, 1},
{0x049c, 1112, 1},
{0x019c, 661, 1},
{0x1f9c, 189, 2},
{0x2c9c, 2628, 1},
{0x039c, 779, 1},
{0x24bc, 2361, 1},
{0xab9c, 1580, 1},
{0xa79c, 3129, 1},
{0x10c9c, 3441, 1},
{0x0222, 550, 1},
{0x1e7c, 1899, 1},
{0x047c, 1076, 1},
{0x1e82, 1908, 1},
{0x24b8, 2349, 1},
{0x0182, 357, 1},
{0x1f82, 139, 2},
{0x2c82, 2589, 1},
{0xab7c, 1484, 1},
{0xffffffff, -1, 0},
{0xab82, 1502, 1},
{0xa782, 3102, 1},
{0x10c82, 3363, 1},
{0x2c63, 1709, 1},
{0x24b6, 2343, 1},
{0x1e80, 1905, 1},
{0x0480, 1082, 1},
{0x1f59, 2190, 1},
{0x1f80, 129, 2},
{0x2c80, 2586, 1},
{0x0059, 71, 1},
{0xa682, 2937, 1},
{0xab80, 1496, 1},
{0xa780, 3099, 1},
{0x10c80, 3357, 1},
{0xffffffff, -1, 0},
{0x1e4c, 1826, 1},
{0x0145, 270, 1},
{0x014c, 279, 1},
{0x1f4c, 2184, 1},
{0x0345, 767, 1},
{0x0045, 12, 1},
{0x004c, 31, 1},
{0xa680, 2934, 1},
{0xa74c, 3036, 1},
{0x1e4a, 1823, 1},
{0x01d5, 441, 1},
{0x014a, 276, 1},
{0x1f4a, 2178, 1},
{0x03d5, 810, 1},
{0x00d5, 141, 1},
{0x004a, 24, 1},
{0x24bf, 2370, 1},
{0xa74a, 3033, 1},
{0xa64c, 2883, 1},
{0x1041c, 3321, 1},
{0x1e1c, 1754, 1},
{0x041c, 926, 1},
{0x011c, 213, 1},
{0x1f1c, 2118, 1},
{0x2c1c, 2505, 1},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xa64a, 2880, 1},
{0x1041a, 3315, 1},
{0x1e1a, 1751, 1},
{0x041a, 920, 1},
{0x011a, 210, 1},
{0x1f1a, 2112, 1},
{0x2c1a, 2499, 1},
{0xabbd, 1679, 1},
{0x0545, 1394, 1},
{0x054c, 1415, 1},
{0x10418, 3309, 1},
{0x1e18, 1748, 1},
{0x0418, 914, 1},
{0x0118, 207, 1},
{0x1f18, 2106, 1},
{0x2c18, 2493, 1},
{0x10bd, 2832, 1},
{0x2163, 2301, 1},
{0x054a, 1409, 1},
{0x1040e, 3279, 1},
{0x1e0e, 1733, 1},
{0x040e, 1028, 1},
{0x010e, 192, 1},
{0x1f0e, 2100, 1},
{0x2c0e, 2463, 1},
{0x1efc, 2076, 1},
{0x04fc, 1256, 1},
{0x01fc, 496, 1},
{0x1ffc, 96, 2},
{0x051c, 1304, 1},
{0x1040c, 3273, 1},
{0x1e0c, 1730, 1},
{0x040c, 1022, 1},
{0x010c, 189, 1},
{0x1f0c, 2094, 1},
{0x2c0c, 2457, 1},
{0x1f6d, 2217, 1},
{0x2c6d, 607, 1},
{0x051a, 1301, 1},
{0x24be, 2367, 1},
{0x10408, 3261, 1},
{0x1e08, 1724, 1},
{0x0408, 1010, 1},
{0x0108, 183, 1},
{0x1f08, 2082, 1},
{0x2c08, 2445, 1},
{0x04c9, 1178, 1},
{0x0518, 1298, 1},
{0x1fc9, 2235, 1},
{0xffffffff, -1, 0},
{0x24ba, 2355, 1},
{0x00c9, 105, 1},
{0x10416, 3303, 1},
{0x1e16, 1745, 1},
{0x0416, 908, 1},
{0x0116, 204, 1},
{0x050e, 1283, 1},
{0x2c16, 2487, 1},
{0x10414, 3297, 1},
{0x1e14, 1742, 1},
{0x0414, 902, 1},
{0x0114, 201, 1},
{0x042b, 971, 1},
{0x2c14, 2481, 1},
{0x1f2b, 2133, 1},
{0x2c2b, 2550, 1},
{0xffffffff, -1, 0},
{0x050c, 1280, 1},
{0x10406, 3255, 1},
{0x1e06, 1721, 1},
{0x0406, 1004, 1},
{0x0106, 180, 1},
{0x13fb, 1697, 1},
{0x2c06, 2439, 1},
{0x24c2, 2379, 1},
{0x118bd, 3597, 1},
{0xffffffff, -1, 0},
{0x0508, 1274, 1},
{0x10404, 3249, 1},
{0x1e04, 1718, 1},
{0x0404, 998, 1},
{0x0104, 177, 1},
{0x1f95, 194, 2},
{0x2c04, 2433, 1},
{0x0395, 752, 1},
{0x24ca, 2403, 1},
{0xab95, 1559, 1},
{0x0531, 1334, 1},
{0x10c95, 3420, 1},
{0x0516, 1295, 1},
{0x1e6c, 1875, 1},
{0x046c, 1052, 1},
{0x016c, 327, 1},
{0x1f6c, 2214, 1},
{0x216d, 2331, 1},
{0x0514, 1292, 1},
{0x0245, 697, 1},
{0x024c, 598, 1},
{0xa76c, 3084, 1},
{0x10400, 3237, 1},
{0x1e00, 1712, 1},
{0x0400, 986, 1},
{0x0100, 171, 1},
{0x24c4, 2385, 1},
{0x2c00, 2421, 1},
{0x0506, 1271, 1},
{0x024a, 595, 1},
{0x1fab, 224, 2},
{0xa66c, 2931, 1},
{0x03ab, 827, 1},
{0x24cf, 2418, 1},
{0xabab, 1625, 1},
{0xa7ab, 631, 1},
{0x10cab, 3486, 1},
{0xffffffff, -1, 0},
{0x0504, 1268, 1},
{0xffffffff, -1, 0},
{0x021c, 544, 1},
{0x01a9, 679, 1},
{0x1fa9, 214, 2},
{0x10ab, 2778, 1},
{0x03a9, 820, 1},
{0x212b, 92, 1},
{0xaba9, 1619, 1},
{0x1e88, 1917, 1},
{0x10ca9, 3480, 1},
{0x021a, 541, 1},
{0x1f88, 129, 2},
{0x2c88, 2598, 1},
{0x0388, 730, 1},
{0x13fd, 1703, 1},
{0xab88, 1520, 1},
{0x10a9, 2772, 1},
{0x10c88, 3381, 1},
{0xffffffff, -1, 0},
{0x0218, 538, 1},
{0x0500, 1262, 1},
{0x1f4d, 2187, 1},
{0x01a7, 393, 1},
{0x1fa7, 244, 2},
{0x004d, 34, 1},
{0x03a7, 814, 1},
{0xa688, 2946, 1},
{0xaba7, 1613, 1},
{0x020e, 523, 1},
{0x10ca7, 3474, 1},
{0x1e6a, 1872, 1},
{0x046a, 1049, 1},
{0x016a, 324, 1},
{0x1f6a, 2208, 1},
{0xffffffff, -1, 0},
{0x216c, 2328, 1},
{0x10a7, 2766, 1},
{0x01d1, 435, 1},
{0xa76a, 3081, 1},
{0x020c, 520, 1},
{0x03d1, 762, 1},
{0x00d1, 129, 1},
{0x1e68, 1869, 1},
{0x0468, 1046, 1},
{0x0168, 321, 1},
{0x1f68, 2202, 1},
{0xffffffff, -1, 0},
{0xff31, 3207, 1},
{0xa66a, 2928, 1},
{0x0208, 514, 1},
{0xa768, 3078, 1},
{0x1e64, 1863, 1},
{0x0464, 1040, 1},
{0x0164, 315, 1},
{0x054d, 1418, 1},
{0x2c64, 673, 1},
{0xffffffff, -1, 0},
{0xff2b, 3189, 1},
{0xffffffff, -1, 0},
{0xa764, 3072, 1},
{0xa668, 2925, 1},
{0x0216, 535, 1},
{0xffffffff, -1, 0},
{0x118ab, 3543, 1},
{0x1e62, 1860, 1},
{0x0462, 1037, 1},
{0x0162, 312, 1},
{0x0214, 532, 1},
{0x2c62, 655, 1},
{0xa664, 2919, 1},
{0x1ed2, 2013, 1},
{0x04d2, 1193, 1},
{0xa762, 3069, 1},
{0x1fd2, 20, 3},
{0x2cd2, 2709, 1},
{0x118a9, 3537, 1},
{0x00d2, 132, 1},
{0x0206, 511, 1},
{0x10420, 3333, 1},
{0x1e20, 1760, 1},
{0x0420, 938, 1},
{0x0120, 219, 1},
{0xa662, 2916, 1},
{0x2c20, 2517, 1},
{0x1e60, 1856, 1},
{0x0460, 1034, 1},
{0x0160, 309, 1},
{0x0204, 508, 1},
{0x2c60, 2562, 1},
{0xffffffff, -1, 0},
{0x24bd, 2364, 1},
{0x216a, 2322, 1},
{0xa760, 3066, 1},
{0xffffffff, -1, 0},
{0xfb16, 125, 2},
{0x118a7, 3531, 1},
{0x1efa, 2073, 1},
{0x04fa, 1253, 1},
{0x01fa, 493, 1},
{0x1ffa, 2262, 1},
{0xfb14, 109, 2},
{0x03fa, 887, 1},
{0xa660, 2913, 1},
{0x2168, 2316, 1},
{0x01b7, 700, 1},
{0x1fb7, 10, 3},
{0x1f6b, 2211, 1},
{0x2c6b, 2577, 1},
{0x0200, 502, 1},
{0xabb7, 1661, 1},
{0xfb06, 29, 2},
{0x1e56, 1841, 1},
{0x2164, 2304, 1},
{0x0156, 294, 1},
{0x1f56, 62, 3},
{0x0520, 1310, 1},
{0x004f, 40, 1},
{0x0056, 62, 1},
{0x10b7, 2814, 1},
{0xa756, 3051, 1},
{0xfb04, 5, 3},
{0x1e78, 1893, 1},
{0x0478, 1070, 1},
{0x0178, 168, 1},
{0x1e54, 1838, 1},
{0x2162, 2298, 1},
{0x0154, 291, 1},
{0x1f54, 57, 3},
{0xab78, 1472, 1},
{0xa656, 2898, 1},
{0x0054, 56, 1},
{0x1e52, 1835, 1},
{0xa754, 3048, 1},
{0x0152, 288, 1},
{0x1f52, 52, 3},
{0x24c9, 2400, 1},
{0x1e32, 1787, 1},
{0x0052, 49, 1},
{0x0132, 243, 1},
{0xa752, 3045, 1},
{0xffffffff, -1, 0},
{0xfb00, 4, 2},
{0xa654, 2895, 1},
{0xffffffff, -1, 0},
{0xa732, 2997, 1},
{0x2160, 2292, 1},
{0x054f, 1424, 1},
{0x0556, 1445, 1},
{0x1e50, 1832, 1},
{0xa652, 2892, 1},
{0x0150, 285, 1},
{0x1f50, 84, 2},
{0x017b, 348, 1},
{0x1e4e, 1829, 1},
{0x0050, 43, 1},
{0x014e, 282, 1},
{0xa750, 3042, 1},
{0xab7b, 1481, 1},
{0xa77b, 3093, 1},
{0x004e, 37, 1},
{0x0554, 1439, 1},
{0xa74e, 3039, 1},
{0x1e48, 1820, 1},
{0xffffffff, -1, 0},
{0x216b, 2325, 1},
{0x1f48, 2172, 1},
{0xa650, 2889, 1},
{0x0552, 1433, 1},
{0x0048, 21, 1},
{0xffffffff, -1, 0},
{0xa748, 3030, 1},
{0xa64e, 2886, 1},
{0x0532, 1337, 1},
{0x1041e, 3327, 1},
{0x1e1e, 1757, 1},
{0x041e, 932, 1},
{0x011e, 216, 1},
{0x118b7, 3579, 1},
{0x2c1e, 2511, 1},
{0xffffffff, -1, 0},
{0xa648, 2877, 1},
{0x1ff9, 2253, 1},
{0xffffffff, -1, 0},
{0x03f9, 878, 1},
{0x0550, 1427, 1},
{0x10412, 3291, 1},
{0x1e12, 1739, 1},
{0x0412, 896, 1},
{0x0112, 198, 1},
{0x054e, 1421, 1},
{0x2c12, 2475, 1},
{0x10410, 3285, 1},
{0x1e10, 1736, 1},
{0x0410, 890, 1},
{0x0110, 195, 1},
{0xffffffff, -1, 0},
{0x2c10, 2469, 1},
{0x2132, 2289, 1},
{0x0548, 1403, 1},
{0x1ef8, 2070, 1},
{0x04f8, 1250, 1},
{0x01f8, 490, 1},
{0x1ff8, 2250, 1},
{0x0220, 381, 1},
{0x1ee2, 2037, 1},
{0x04e2, 1217, 1},
{0x01e2, 462, 1},
{0x1fe2, 36, 3},
{0x2ce2, 2733, 1},
{0x03e2, 857, 1},
{0x051e, 1307, 1},
{0x1ede, 2031, 1},
{0x04de, 1211, 1},
{0x01de, 456, 1},
{0xffffffff, -1, 0},
{0x2cde, 2727, 1},
{0x03de, 851, 1},
{0x00de, 165, 1},
{0x1f69, 2205, 1},
{0x2c69, 2574, 1},
{0x1eda, 2025, 1},
{0x04da, 1205, 1},
{0x0512, 1289, 1},
{0x1fda, 2244, 1},
{0x2cda, 2721, 1},
{0x03da, 845, 1},
{0x00da, 153, 1},
{0xffffffff, -1, 0},
{0x0510, 1286, 1},
{0x1ed8, 2022, 1},
{0x04d8, 1202, 1},
{0xffffffff, -1, 0},
{0x1fd8, 2274, 1},
{0x2cd8, 2718, 1},
{0x03d8, 842, 1},
{0x00d8, 147, 1},
{0x1ed6, 2019, 1},
{0x04d6, 1199, 1},
{0xffffffff, -1, 0},
{0x1fd6, 76, 2},
{0x2cd6, 2715, 1},
{0x03d6, 792, 1},
{0x00d6, 144, 1},
{0x1ec8, 1998, 1},
{0xffffffff, -1, 0},
{0x01c8, 421, 1},
{0x1fc8, 2232, 1},
{0x2cc8, 2694, 1},
{0xff32, 3210, 1},
{0x00c8, 102, 1},
{0x04c7, 1175, 1},
{0x01c7, 421, 1},
{0x1fc7, 15, 3},
{0x1ec0, 1986, 1},
{0x04c0, 1187, 1},
{0x00c7, 99, 1},
{0xffffffff, -1, 0},
{0x2cc0, 2682, 1},
{0x0179, 345, 1},
{0x00c0, 77, 1},
{0x0232, 574, 1},
{0x01b3, 402, 1},
{0x1fb3, 62, 2},
{0xab79, 1475, 1},
{0xa779, 3090, 1},
{0x10c7, 2859, 1},
{0xabb3, 1649, 1},
{0xa7b3, 3156, 1},
{0x1fa5, 234, 2},
{0x10c0, 2841, 1},
{0x03a5, 807, 1},
{0xffffffff, -1, 0},
{0xaba5, 1607, 1},
{0x01b1, 691, 1},
{0x10ca5, 3468, 1},
{0x10b3, 2802, 1},
{0x2169, 2319, 1},
{0x024e, 601, 1},
{0xabb1, 1643, 1},
{0xa7b1, 682, 1},
{0x10cb1, 3504, 1},
{0x10a5, 2760, 1},
{0xffffffff, -1, 0},
{0x01af, 399, 1},
{0x1faf, 244, 2},
{0xffffffff, -1, 0},
{0x0248, 592, 1},
{0x10b1, 2796, 1},
{0xabaf, 1637, 1},
{0x1fad, 234, 2},
{0x10caf, 3498, 1},
{0x04cd, 1184, 1},
{0x01cd, 429, 1},
{0xabad, 1631, 1},
{0xa7ad, 658, 1},
{0x10cad, 3492, 1},
{0x00cd, 117, 1},
{0x10af, 2790, 1},
{0x021e, 547, 1},
{0x1fa3, 224, 2},
{0xffffffff, -1, 0},
{0x03a3, 800, 1},
{0x10ad, 2784, 1},
{0xaba3, 1601, 1},
{0xffffffff, -1, 0},
{0x10ca3, 3462, 1},
{0x10cd, 2862, 1},
{0x1fa1, 214, 2},
{0x24b7, 2346, 1},
{0x03a1, 796, 1},
{0x0212, 529, 1},
{0xaba1, 1595, 1},
{0x10a3, 2754, 1},
{0x10ca1, 3456, 1},
{0x01d3, 438, 1},
{0x1fd3, 25, 3},
{0x0210, 526, 1},
{0xffffffff, -1, 0},
{0x00d3, 135, 1},
{0x1e97, 34, 2},
{0x10a1, 2748, 1},
{0x0197, 649, 1},
{0x1f97, 204, 2},
{0xffffffff, -1, 0},
{0x0397, 759, 1},
{0x1041d, 3324, 1},
{0xab97, 1565, 1},
{0x041d, 929, 1},
{0x10c97, 3426, 1},
{0x1f1d, 2121, 1},
{0x2c1d, 2508, 1},
{0x1e72, 1884, 1},
{0x0472, 1061, 1},
{0x0172, 336, 1},
{0x118b3, 3567, 1},
{0x2c72, 2580, 1},
{0x0372, 712, 1},
{0x1041b, 3318, 1},
{0xab72, 1454, 1},
{0x041b, 923, 1},
{0x118a5, 3525, 1},
{0x1f1b, 2115, 1},
{0x2c1b, 2502, 1},
{0x1e70, 1881, 1},
{0x0470, 1058, 1},
{0x0170, 333, 1},
{0x118b1, 3561, 1},
{0x2c70, 610, 1},
{0x0370, 709, 1},
{0x1e46, 1817, 1},
{0xab70, 1448, 1},
{0x1e66, 1866, 1},
{0x0466, 1043, 1},
{0x0166, 318, 1},
{0x1e44, 1814, 1},
{0x0046, 15, 1},
{0x118af, 3555, 1},
{0xa746, 3027, 1},
{0xffffffff, -1, 0},
{0xa766, 3075, 1},
{0x0044, 9, 1},
{0x118ad, 3549, 1},
{0xa744, 3024, 1},
{0x1e7a, 1896, 1},
{0x047a, 1073, 1},
{0x1e3a, 1799, 1},
{0xffffffff, -1, 0},
{0xa646, 2874, 1},
{0x1f3a, 2154, 1},
{0xa666, 2922, 1},
{0xab7a, 1478, 1},
{0x118a3, 3519, 1},
{0xa644, 2871, 1},
{0xa73a, 3009, 1},
{0xffffffff, -1, 0},
{0x1ef4, 2064, 1},
{0x04f4, 1244, 1},
{0x01f4, 487, 1},
{0x1ff4, 101, 2},
{0x118a1, 3513, 1},
{0x03f4, 762, 1},
{0x1eec, 2052, 1},
{0x04ec, 1232, 1},
{0x01ec, 477, 1},
{0x1fec, 2286, 1},
{0x0546, 1397, 1},
{0x03ec, 872, 1},
{0xffffffff, -1, 0},
{0x013f, 261, 1},
{0x1f3f, 2169, 1},
{0x0544, 1391, 1},
{0x1eea, 2049, 1},
{0x04ea, 1229, 1},
{0x01ea, 474, 1},
{0x1fea, 2256, 1},
{0xffffffff, -1, 0},
{0x03ea, 869, 1},
{0x1ee8, 2046, 1},
{0x04e8, 1226, 1},
{0x01e8, 471, 1},
{0x1fe8, 2280, 1},
{0x053a, 1361, 1},
{0x03e8, 866, 1},
{0x1ee6, 2043, 1},
{0x04e6, 1223, 1},
{0x01e6, 468, 1},
{0x1fe6, 88, 2},
{0x1f4b, 2181, 1},
{0x03e6, 863, 1},
{0x1e5e, 1853, 1},
{0x004b, 27, 1},
{0x015e, 306, 1},
{0x2166, 2310, 1},
{0x1ee4, 2040, 1},
{0x04e4, 1220, 1},
{0x01e4, 465, 1},
{0x1fe4, 80, 2},
{0xa75e, 3063, 1},
{0x03e4, 860, 1},
{0x1ee0, 2034, 1},
{0x04e0, 1214, 1},
{0x01e0, 459, 1},
{0x053f, 1376, 1},
{0x2ce0, 2730, 1},
{0x03e0, 854, 1},
{0x1edc, 2028, 1},
{0x04dc, 1208, 1},
{0xa65e, 2910, 1},
{0xffffffff, -1, 0},
{0x2cdc, 2724, 1},
{0x03dc, 848, 1},
{0x00dc, 159, 1},
{0x1ed0, 2010, 1},
{0x04d0, 1190, 1},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0x2cd0, 2706, 1},
{0x03d0, 742, 1},
{0x00d0, 126, 1},
{0x1ecc, 2004, 1},
{0x054b, 1412, 1},
{0xffffffff, -1, 0},
{0x1fcc, 71, 2},
{0x2ccc, 2700, 1},
{0x1ec6, 1995, 1},
{0x00cc, 114, 1},
{0xffffffff, -1, 0},
{0x1fc6, 67, 2},
{0x2cc6, 2691, 1},
{0x24c8, 2397, 1},
{0x00c6, 96, 1},
{0x04c5, 1172, 1},
{0x01c5, 417, 1},
{0xffffffff, -1, 0},
{0x1fbb, 2229, 1},
{0x24c7, 2394, 1},
{0x00c5, 92, 1},
{0x1fb9, 2271, 1},
{0xabbb, 1673, 1},
{0x24c0, 2373, 1},
{0x04c3, 1169, 1},
{0xabb9, 1667, 1},
{0x1fc3, 71, 2},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0x00c3, 86, 1},
{0x10c5, 2856, 1},
{0x10bb, 2826, 1},
{0x1ed4, 2016, 1},
{0x04d4, 1196, 1},
{0x10b9, 2820, 1},
{0x13fc, 1700, 1},
{0x2cd4, 2712, 1},
{0x0246, 589, 1},
{0x00d4, 138, 1},
{0x10c3, 2850, 1},
{0xffffffff, -1, 0},
{0xff3a, 3234, 1},
{0x0244, 688, 1},
{0x019f, 670, 1},
{0x1f9f, 204, 2},
{0xffffffff, -1, 0},
{0x039f, 789, 1},
{0xffffffff, -1, 0},
{0xab9f, 1589, 1},
{0xffffffff, -1, 0},
{0x10c9f, 3450, 1},
{0x019d, 667, 1},
{0x1f9d, 194, 2},
{0x023a, 2565, 1},
{0x039d, 783, 1},
{0x1e5a, 1847, 1},
{0xab9d, 1583, 1},
{0x015a, 300, 1},
{0x10c9d, 3444, 1},
{0x1e9b, 1856, 1},
{0x24cd, 2412, 1},
{0x005a, 74, 1},
{0x1f9b, 184, 2},
{0xa75a, 3057, 1},
{0x039b, 776, 1},
{0x1ece, 2007, 1},
{0xab9b, 1577, 1},
{0x1e99, 42, 2},
{0x10c9b, 3438, 1},
{0x2cce, 2703, 1},
{0x1f99, 174, 2},
{0x00ce, 120, 1},
{0x0399, 767, 1},
{0xa65a, 2904, 1},
{0xab99, 1571, 1},
{0xffffffff, -1, 0},
{0x10c99, 3432, 1},
{0x0193, 634, 1},
{0x1f93, 184, 2},
{0x1e58, 1844, 1},
{0x0393, 746, 1},
{0x0158, 297, 1},
{0xab93, 1553, 1},
{0xffffffff, -1, 0},
{0x10c93, 3414, 1},
{0x0058, 68, 1},
{0x042d, 977, 1},
{0xa758, 3054, 1},
{0x1f2d, 2139, 1},
{0x2c2d, 2556, 1},
{0x118bb, 3591, 1},
{0x0191, 369, 1},
{0x1f91, 174, 2},
{0x118b9, 3585, 1},
{0x0391, 739, 1},
{0xffffffff, -1, 0},
{0xab91, 1547, 1},
{0xa658, 2901, 1},
{0x10c91, 3408, 1},
{0x018f, 625, 1},
{0x1f8f, 164, 2},
{0xffffffff, -1, 0},
{0x038f, 836, 1},
{0xffffffff, -1, 0},
{0xab8f, 1541, 1},
{0xffffffff, -1, 0},
{0x10c8f, 3402, 1},
{0x018b, 366, 1},
{0x1f8b, 144, 2},
{0xffffffff, -1, 0},
{0x0187, 363, 1},
{0x1f87, 164, 2},
{0xab8b, 1529, 1},
{0xa78b, 3111, 1},
{0x10c8b, 3390, 1},
{0xab87, 1517, 1},
{0x04c1, 1166, 1},
{0x10c87, 3378, 1},
{0x1e7e, 1902, 1},
{0x047e, 1079, 1},
{0xffffffff, -1, 0},
{0x00c1, 80, 1},
{0x2c7e, 580, 1},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xab7e, 1490, 1},
{0xa77e, 3096, 1},
{0x1e76, 1890, 1},
{0x0476, 1067, 1},
{0x0176, 342, 1},
{0x1e42, 1811, 1},
{0x10c1, 2844, 1},
{0x0376, 715, 1},
{0x1e36, 1793, 1},
{0xab76, 1466, 1},
{0x0136, 249, 1},
{0x0042, 3, 1},
{0x1e3e, 1805, 1},
{0xa742, 3021, 1},
{0x1e38, 1796, 1},
{0x1f3e, 2166, 1},
{0xa736, 3003, 1},
{0x1f38, 2148, 1},
{0xffffffff, -1, 0},
{0x0587, 105, 2},
{0xa73e, 3015, 1},
{0xffffffff, -1, 0},
{0xa738, 3006, 1},
{0xa642, 2868, 1},
{0x1e5c, 1850, 1},
{0x1e34, 1790, 1},
{0x015c, 303, 1},
{0x0134, 246, 1},
{0x1ef6, 2067, 1},
{0x04f6, 1247, 1},
{0x01f6, 372, 1},
{0x1ff6, 92, 2},
{0xa75c, 3060, 1},
{0xa734, 3000, 1},
{0x1ef0, 2058, 1},
{0x04f0, 1238, 1},
{0x01f0, 20, 2},
{0xffffffff, -1, 0},
{0x1e30, 1784, 1},
{0x03f0, 772, 1},
{0x0130, 261, 2},
{0x0542, 1385, 1},
{0xa65c, 2907, 1},
{0x1f83, 144, 2},
{0x0536, 1349, 1},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xab83, 1505, 1},
{0x053e, 1373, 1},
{0x10c83, 3366, 1},
{0x0538, 1355, 1},
{0x1eee, 2055, 1},
{0x04ee, 1235, 1},
{0x01ee, 480, 1},
{0x1f8d, 154, 2},
{0xffffffff, -1, 0},
{0x03ee, 875, 1},
{0xffffffff, -1, 0},
{0xab8d, 1535, 1},
{0xa78d, 643, 1},
{0x10c8d, 3396, 1},
{0x0534, 1343, 1},
{0x0181, 613, 1},
{0x1f81, 134, 2},
{0x013d, 258, 1},
{0x1f3d, 2163, 1},
{0xffffffff, -1, 0},
{0xab81, 1499, 1},
{0x017f, 52, 1},
{0x10c81, 3360, 1},
{0x2c7f, 583, 1},
{0x037f, 881, 1},
{0xff2d, 3195, 1},
{0xab7f, 1493, 1},
{0x1e74, 1887, 1},
{0x0474, 1064, 1},
{0x0174, 339, 1},
{0x1e3c, 1802, 1},
{0x0149, 46, 2},
{0x1f49, 2175, 1},
{0x1f3c, 2160, 1},
{0xab74, 1460, 1},
{0x0049, 3606, 1},
{0x0143, 267, 1},
{0x24cc, 2409, 1},
{0xa73c, 3012, 1},
{0xffffffff, -1, 0},
{0x0043, 6, 1},
{0x0141, 264, 1},
{0x24c6, 2391, 1},
{0x013b, 255, 1},
{0x1f3b, 2157, 1},
{0x0041, 0, 1},
{0x0139, 252, 1},
{0x1f39, 2151, 1},
{0x24c5, 2388, 1},
{0x24bb, 2358, 1},
{0x13fa, 1694, 1},
{0x053d, 1370, 1},
{0x24b9, 2352, 1},
{0x0429, 965, 1},
{0x2183, 2340, 1},
{0x1f29, 2127, 1},
{0x2c29, 2544, 1},
{0x24c3, 2382, 1},
{0x10427, 3354, 1},
{0x10425, 3348, 1},
{0x0427, 959, 1},
{0x0425, 953, 1},
{0xffffffff, -1, 0},
{0x2c27, 2538, 1},
{0x2c25, 2532, 1},
{0x0549, 1406, 1},
{0x053c, 1367, 1},
{0x10423, 3342, 1},
{0xffffffff, -1, 0},
{0x0423, 947, 1},
{0x0543, 1388, 1},
{0xffffffff, -1, 0},
{0x2c23, 2526, 1},
{0xff36, 3222, 1},
{0xffffffff, -1, 0},
{0x0541, 1382, 1},
{0x10421, 3336, 1},
{0x053b, 1364, 1},
{0x0421, 941, 1},
{0xff38, 3228, 1},
{0x0539, 1358, 1},
{0x2c21, 2520, 1},
{0x10419, 3312, 1},
{0x10417, 3306, 1},
{0x0419, 917, 1},
{0x0417, 911, 1},
{0x1f19, 2109, 1},
{0x2c19, 2496, 1},
{0x2c17, 2490, 1},
{0x023e, 2568, 1},
{0xff34, 3216, 1},
{0x10415, 3300, 1},
{0x10413, 3294, 1},
{0x0415, 905, 1},
{0x0413, 899, 1},
{0xffffffff, -1, 0},
{0x2c15, 2484, 1},
{0x2c13, 2478, 1},
{0xffffffff, -1, 0},
{0x24ce, 2415, 1},
{0x1040f, 3282, 1},
{0xffffffff, -1, 0},
{0x040f, 1031, 1},
{0xff30, 3204, 1},
{0x1f0f, 2103, 1},
{0x2c0f, 2466, 1},
{0x1040d, 3276, 1},
{0xffffffff, -1, 0},
{0x040d, 1025, 1},
{0x0147, 273, 1},
{0x1f0d, 2097, 1},
{0x2c0d, 2460, 1},
{0x1040b, 3270, 1},
{0x0047, 18, 1},
{0x040b, 1019, 1},
{0x0230, 571, 1},
{0x1f0b, 2091, 1},
{0x2c0b, 2454, 1},
{0x10409, 3264, 1},
{0x10405, 3252, 1},
{0x0409, 1013, 1},
{0x0405, 1001, 1},
{0x1f09, 2085, 1},
{0x2c09, 2448, 1},
{0x2c05, 2436, 1},
{0x10403, 3246, 1},
{0x10401, 3240, 1},
{0x0403, 995, 1},
{0x0401, 989, 1},
{0xffffffff, -1, 0},
{0x2c03, 2430, 1},
{0x2c01, 2424, 1},
{0x13f9, 1691, 1},
{0x042f, 983, 1},
{0xffffffff, -1, 0},
{0x1f2f, 2145, 1},
{0x1041f, 3330, 1},
{0xffffffff, -1, 0},
{0x041f, 935, 1},
{0x023d, 378, 1},
{0x10411, 3288, 1},
{0x2c1f, 2514, 1},
{0x0411, 893, 1},
{0x0547, 1400, 1},
{0xffffffff, -1, 0},
{0x2c11, 2472, 1},
{0x10407, 3258, 1},
{0xffffffff, -1, 0},
{0x0407, 1007, 1},
{0x24c1, 2376, 1},
{0xffffffff, -1, 0},
{0x2c07, 2442, 1},
{0xffffffff, -1, 0},
{0x13f8, 1688, 1},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xff39, 3231, 1},
{0xffffffff, -1, 0},
{0x0243, 354, 1},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0x0241, 586, 1},
{0xff29, 3183, 1},
{0x023b, 577, 1},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xff27, 3177, 1},
{0xff25, 3171, 1},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xff23, 3165, 1},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xff21, 3159, 1},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0},
{0xfb17, 117, 2},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xff2f, 3201, 1},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xfb15, 113, 2},
{0xfb13, 121, 2},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xffffffff, -1, 0},
{0xfb05, 29, 2},
{0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0}, {0xffffffff, -1, 0},
{0xfb03, 0, 3},
{0xfb01, 8, 2}
};
if (0 == 0)
{
int key = hash(&code);
if (key <= MAX_HASH_VALUE && key >= 0)
{
OnigCodePoint gcode = wordlist[key].code;
if (code == gcode && wordlist[key].index >= 0)
return &wordlist[key];
}
}
return 0;
}
| 0 |
open5gs | c0f695525088486c509f37a02ff1fda211b141bb | NOT_APPLICABLE | NOT_APPLICABLE | void ogs_nas_5gs_nas_guti_to_mobility_identity_guti(
ogs_nas_5gs_guti_t *nas_guti,
ogs_nas_5gs_mobile_identity_guti_t *mobile_identity_guti)
{
ogs_assert(nas_guti);
ogs_assert(mobile_identity_guti);
memset(mobile_identity_guti, 0, sizeof(*mobile_identity_guti));
/*
* TS24.501
* 9.11.3.4 5GS mobile identity
* Figure 9.11.3.4.1 5GS mobile identity IE for type of identity "5G-GUTI"
*
* Octet 1 : 5GS mobile identity IEI
* Octet 2-3 : Length of 5GS mobile identity contents
* Octet 4 : 1 1 1 1 0 0 1 0
*
* <Octet 4>
* h.supi_format = 0xf (1 1 1 1)
* h.odd_even = 0 (Spare 0)
* h.type = x x x (Type of identity : 5G-GUTI)
*/
mobile_identity_guti->h.supi_format = 0xf;
mobile_identity_guti->h.type = OGS_NAS_5GS_MOBILE_IDENTITY_GUTI;
memcpy(&mobile_identity_guti->nas_plmn_id,
&nas_guti->nas_plmn_id, OGS_PLMN_ID_LEN);
memcpy(&mobile_identity_guti->amf_id,
&nas_guti->amf_id, sizeof(ogs_amf_id_t));
mobile_identity_guti->m_tmsi = htobe32(nas_guti->m_tmsi);
} | 0 |
libgit2 | 928429c5c96a701bcbcafacb2421a82602b36915 | NOT_APPLICABLE | NOT_APPLICABLE | GIT_INLINE(git_filemode_t) normalize_filemode(git_filemode_t filemode)
{
/* Tree bits set, but it's not a commit */
if (GIT_MODE_TYPE(filemode) == GIT_FILEMODE_TREE)
return GIT_FILEMODE_TREE;
/* If any of the x bits are set */
if (GIT_PERMS_IS_EXEC(filemode))
return GIT_FILEMODE_BLOB_EXECUTABLE;
/* 16XXXX means commit */
if (GIT_MODE_TYPE(filemode) == GIT_FILEMODE_COMMIT)
return GIT_FILEMODE_COMMIT;
/* 12XXXX means commit */
if (GIT_MODE_TYPE(filemode) == GIT_FILEMODE_LINK)
return GIT_FILEMODE_LINK;
/* Otherwise, return a blob */
return GIT_FILEMODE_BLOB;
} | 0 |
envoy | e9f936d85dc1edc34fabd0a1725ec180f2316353 | NOT_APPLICABLE | NOT_APPLICABLE | TEST_P(SslSocketTest, FailedClientCertificateSpkiVerificationNoClientCertificate) {
envoy::config::listener::v3::Listener listener;
envoy::config::listener::v3::FilterChain* filter_chain = listener.add_filter_chains();
envoy::extensions::transport_sockets::tls::v3::DownstreamTlsContext tls_context;
envoy::extensions::transport_sockets::tls::v3::TlsCertificate* server_cert =
tls_context.mutable_common_tls_context()->add_tls_certificates();
server_cert->mutable_certificate_chain()->set_filename(TestEnvironment::substitute(
"{{ test_rundir }}/test/extensions/transport_sockets/tls/test_data/san_dns_cert.pem"));
server_cert->mutable_private_key()->set_filename(TestEnvironment::substitute(
"{{ test_rundir }}/test/extensions/transport_sockets/tls/test_data/san_dns_key.pem"));
envoy::extensions::transport_sockets::tls::v3::CertificateValidationContext*
server_validation_ctx =
tls_context.mutable_common_tls_context()->mutable_validation_context();
server_validation_ctx->mutable_trusted_ca()->set_filename(TestEnvironment::substitute(
"{{ test_rundir }}/test/extensions/transport_sockets/tls/test_data/ca_cert.pem"));
server_validation_ctx->add_verify_certificate_spki(TEST_SAN_DNS_CERT_SPKI);
server_validation_ctx->add_verify_certificate_spki(TEST_SAN_URI_CERT_SPKI);
updateFilterChain(tls_context, *filter_chain);
envoy::extensions::transport_sockets::tls::v3::UpstreamTlsContext client;
TestUtilOptionsV2 test_options(listener, client, false, GetParam());
testUtilV2(test_options.setExpectedServerStats("ssl.fail_verify_no_cert")
.setExpectedTransportFailureReasonContains("SSLV3_ALERT_HANDSHAKE_FAILURE"));
// Fails even with client renegotiation.
client.set_allow_renegotiation(true);
testUtilV2(test_options);
} | 0 |
linux | 9804501fa1228048857910a6bf23e085aade37cc | NOT_APPLICABLE | NOT_APPLICABLE | void aarp_cleanup_module(void)
{
del_timer_sync(&aarp_timer);
unregister_netdevice_notifier(&aarp_notifier);
unregister_snap_client(aarp_dl);
aarp_purge();
} | 0 |
php-src | a15bffd105ac28fd0dd9b596632dbf035238fda3 | NOT_APPLICABLE | NOT_APPLICABLE | static zend_bool add_post_var(zval *arr, post_var_data_t *var, zend_bool eof)
{
char *start, *ksep, *vsep, *val;
size_t klen, vlen;
size_t new_vlen;
if (var->ptr >= var->end) {
return 0;
}
start = var->ptr + var->already_scanned;
vsep = memchr(start, '&', var->end - start);
if (!vsep) {
if (!eof) {
var->already_scanned = var->end - var->ptr;
return 0;
} else {
vsep = var->end;
}
}
ksep = memchr(var->ptr, '=', vsep - var->ptr);
if (ksep) {
*ksep = '\0';
/* "foo=bar&" or "foo=&" */
klen = ksep - var->ptr;
vlen = vsep - ++ksep;
} else {
ksep = "";
/* "foo&" */
klen = vsep - var->ptr;
vlen = 0;
}
php_url_decode(var->ptr, klen);
val = estrndup(ksep, vlen);
if (vlen) {
vlen = php_url_decode(val, vlen);
}
if (sapi_module.input_filter(PARSE_POST, var->ptr, &val, vlen, &new_vlen)) {
php_register_variable_safe(var->ptr, val, new_vlen, arr);
}
efree(val);
var->ptr = vsep + (vsep != var->end);
var->already_scanned = 0;
return 1;
}
| 0 |
php-src | e5c95234d87fcb8f6b7569a96a89d1e1544749a6 | NOT_APPLICABLE | NOT_APPLICABLE | PHP_METHOD(Phar, isBuffering)
{
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
return;
}
RETURN_BOOL(phar_obj->archive->donotflush);
} | 0 |
linux | 7572777eef78ebdee1ecb7c258c0ef94d35bad16 | NOT_APPLICABLE | NOT_APPLICABLE | static sector_t fuse_bmap(struct address_space *mapping, sector_t block)
{
struct inode *inode = mapping->host;
struct fuse_conn *fc = get_fuse_conn(inode);
struct fuse_req *req;
struct fuse_bmap_in inarg;
struct fuse_bmap_out outarg;
int err;
if (!inode->i_sb->s_bdev || fc->no_bmap)
return 0;
req = fuse_get_req(fc);
if (IS_ERR(req))
return 0;
memset(&inarg, 0, sizeof(inarg));
inarg.block = block;
inarg.blocksize = inode->i_sb->s_blocksize;
req->in.h.opcode = FUSE_BMAP;
req->in.h.nodeid = get_node_id(inode);
req->in.numargs = 1;
req->in.args[0].size = sizeof(inarg);
req->in.args[0].value = &inarg;
req->out.numargs = 1;
req->out.args[0].size = sizeof(outarg);
req->out.args[0].value = &outarg;
fuse_request_send(fc, req);
err = req->out.h.error;
fuse_put_request(fc, req);
if (err == -ENOSYS)
fc->no_bmap = 1;
return err ? 0 : outarg.block;
}
| 0 |
radare2 | 4d3811681a80f92a53e795f6a64c4b0fc2c8dd22 | NOT_APPLICABLE | NOT_APPLICABLE | static void cmd_anal_fcn_sig(RCore *core, const char *input) {
bool json = (input[0] == 'j');
char *p = strchr (input, ' ');
char *fcn_name = p ? r_str_trim_dup (p): NULL;
RListIter *iter;
RAnalFuncArg *arg;
RAnalFunction *fcn;
if (fcn_name) {
fcn = r_anal_fcn_find_name (core->anal, fcn_name);
} else {
fcn = r_anal_get_fcn_in (core->anal, core->offset, 0);
if (fcn) {
fcn_name = fcn->name;
}
}
if (!fcn) {
return;
}
if (json) {
PJ *j = pj_new ();
if (!j) {
return;
}
pj_a (j);
char *key = NULL;
if (fcn_name) {
key = resolve_fcn_name (core->anal, fcn_name);
}
if (key) {
const char *fcn_type = r_type_func_ret (core->anal->sdb_types, key);
int nargs = r_type_func_args_count (core->anal->sdb_types, key);
if (fcn_type) {
pj_o (j);
pj_ks (j, "name", r_str_get (key));
pj_ks (j, "return", r_str_get (fcn_type));
pj_k (j, "args");
pj_a (j);
if (nargs) {
RList *list = r_core_get_func_args (core, fcn_name);
r_list_foreach (list, iter, arg) {
char *type = arg->orig_c_type;
pj_o (j);
pj_ks (j, "name", arg->name);
pj_ks (j, "type", type);
pj_end (j);
}
r_list_free (list);
}
pj_end (j);
pj_ki (j, "count", nargs);
pj_end (j);
}
free (key);
} else {
pj_o (j);
pj_ks (j, "name", r_str_get (fcn_name));
pj_k (j, "args");
pj_a (j);
RAnalFcnVarsCache cache;
r_anal_fcn_vars_cache_init (core->anal, &cache, fcn);
int nargs = 0;
RAnalVar *var;
r_list_foreach (cache.rvars, iter, var) {
nargs++;
pj_o (j);
pj_ks (j, "name", var->name);
pj_ks (j, "type", var->type);
pj_end (j);
}
r_list_foreach (cache.bvars, iter, var) {
if (var->delta <= 0) {
continue;
}
nargs++;
pj_o (j);
pj_ks (j, "name", var->name);
pj_ks (j, "type", var->type);
pj_end (j);
}
r_list_foreach (cache.svars, iter, var) {
if (!var->isarg) {
continue;
}
nargs++;
pj_o (j);
pj_ks (j, "name", var->name);
pj_ks (j, "type", var->type);
pj_end (j);
}
r_anal_fcn_vars_cache_fini (&cache);
pj_end (j);
pj_ki (j, "count", nargs);
pj_end (j);
}
pj_end (j);
const char *s = pj_string (j);
if (s) {
r_cons_printf ("%s\n", s);
}
pj_free (j);
} else {
char *sig = r_anal_fcn_format_sig (core->anal, fcn, fcn_name, NULL, NULL, NULL);
if (sig) {
r_cons_printf ("%s\n", sig);
free (sig);
}
}
} | 0 |
libXrandr | a0df3e1c7728205e5c7650b2e6dce684139254a6 | NOT_APPLICABLE | NOT_APPLICABLE | Rotation XRRConfigRotations(XRRScreenConfiguration *config, Rotation *current_rotation)
{
*current_rotation = config->current_rotation;
return config->rotations;
}
| 0 |
linux | 51ebd3181572af8d5076808dab2682d800f6da5d | NOT_APPLICABLE | NOT_APPLICABLE | static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie)
{
struct rt6_info *rt;
rt = (struct rt6_info *) dst;
/* All IPV6 dsts are created with ->obsolete set to the value
* DST_OBSOLETE_FORCE_CHK which forces validation calls down
* into this function always.
*/
if (rt->rt6i_genid != rt_genid(dev_net(rt->dst.dev)))
return NULL;
if (rt->rt6i_node && (rt->rt6i_node->fn_sernum == cookie)) {
if (rt->rt6i_peer_genid != rt6_peer_genid()) {
if (!rt6_has_peer(rt))
rt6_bind_peer(rt, 0);
rt->rt6i_peer_genid = rt6_peer_genid();
}
return dst;
}
return NULL;
} | 0 |
perl5 | 897d1f7fd515b828e4b198d8b8bef76c6faf03ed | NOT_APPLICABLE | NOT_APPLICABLE | PERL_STATIC_INLINE void
S_invlist_iterfinish(SV* invlist)
{
/* Terminate iterator for invlist. This is to catch development errors.
* Any iteration that is interrupted before completed should call this
* function. Functions that add code points anywhere else but to the end
* of an inversion list assert that they are not in the middle of an
* iteration. If they were, the addition would make the iteration
* problematical: if the iteration hadn't reached the place where things
* were being added, it would be ok */
PERL_ARGS_ASSERT_INVLIST_ITERFINISH;
*get_invlist_iter_addr(invlist) = (STRLEN) UV_MAX; | 0 |
linux | 70789d7052239992824628db8133de08dc78e593 | NOT_APPLICABLE | NOT_APPLICABLE | static inline int ip6_frags_ns_sysctl_register(struct net *net)
{
return 0;
}
| 0 |
Chrome | 3b0d77670a0613f409110817455d2137576b485a | NOT_APPLICABLE | NOT_APPLICABLE | uint64_t total_bytes() const { return total_bytes_; }
| 0 |
Chrome | d0947db40187f4708c58e64cbd6013faf9eddeed | CVE-2013-2877 | CWE-119 | xmlParseAttValueInternal(xmlParserCtxtPtr ctxt, int *len, int *alloc,
int normalize)
{
xmlChar limit = 0;
const xmlChar *in = NULL, *start, *end, *last;
xmlChar *ret = NULL;
GROW;
in = (xmlChar *) CUR_PTR;
if (*in != '"' && *in != '\'') {
xmlFatalErr(ctxt, XML_ERR_ATTRIBUTE_NOT_STARTED, NULL);
return (NULL);
}
ctxt->instate = XML_PARSER_ATTRIBUTE_VALUE;
/*
* try to handle in this routine the most common case where no
* allocation of a new string is required and where content is
* pure ASCII.
*/
limit = *in++;
end = ctxt->input->end;
start = in;
if (in >= end) {
const xmlChar *oldbase = ctxt->input->base;
GROW;
if (oldbase != ctxt->input->base) {
long delta = ctxt->input->base - oldbase;
start = start + delta;
in = in + delta;
}
end = ctxt->input->end;
}
if (normalize) {
/*
* Skip any leading spaces
*/
while ((in < end) && (*in != limit) &&
((*in == 0x20) || (*in == 0x9) ||
(*in == 0xA) || (*in == 0xD))) {
in++;
start = in;
if (in >= end) {
const xmlChar *oldbase = ctxt->input->base;
GROW;
if (oldbase != ctxt->input->base) {
long delta = ctxt->input->base - oldbase;
start = start + delta;
in = in + delta;
}
end = ctxt->input->end;
}
}
while ((in < end) && (*in != limit) && (*in >= 0x20) &&
(*in <= 0x7f) && (*in != '&') && (*in != '<')) {
if ((*in++ == 0x20) && (*in == 0x20)) break;
if (in >= end) {
const xmlChar *oldbase = ctxt->input->base;
GROW;
if (oldbase != ctxt->input->base) {
long delta = ctxt->input->base - oldbase;
start = start + delta;
in = in + delta;
}
end = ctxt->input->end;
}
}
last = in;
/*
* skip the trailing blanks
*/
while ((last[-1] == 0x20) && (last > start)) last--;
while ((in < end) && (*in != limit) &&
((*in == 0x20) || (*in == 0x9) ||
(*in == 0xA) || (*in == 0xD))) {
in++;
if (in >= end) {
const xmlChar *oldbase = ctxt->input->base;
GROW;
if (oldbase != ctxt->input->base) {
long delta = ctxt->input->base - oldbase;
start = start + delta;
in = in + delta;
last = last + delta;
}
end = ctxt->input->end;
}
}
if (*in != limit) goto need_complex;
} else {
while ((in < end) && (*in != limit) && (*in >= 0x20) &&
(*in <= 0x7f) && (*in != '&') && (*in != '<')) {
in++;
if (in >= end) {
const xmlChar *oldbase = ctxt->input->base;
GROW;
if (oldbase != ctxt->input->base) {
long delta = ctxt->input->base - oldbase;
start = start + delta;
in = in + delta;
}
end = ctxt->input->end;
}
}
last = in;
if (*in != limit) goto need_complex;
}
in++;
if (len != NULL) {
*len = last - start;
ret = (xmlChar *) start;
} else {
if (alloc) *alloc = 1;
ret = xmlStrndup(start, last - start);
}
CUR_PTR = in;
if (alloc) *alloc = 0;
return ret;
need_complex:
if (alloc) *alloc = 1;
return xmlParseAttValueComplex(ctxt, len, normalize);
}
| 1 |
linux | 853bc26a7ea39e354b9f8889ae7ad1492ffa28d2 | NOT_APPLICABLE | NOT_APPLICABLE | int o2nm_depend_this_node(void)
{
int ret = 0;
struct o2nm_node *local_node;
local_node = o2nm_get_node_by_num(o2nm_this_node());
if (!local_node) {
ret = -EINVAL;
goto out;
}
ret = o2nm_depend_item(&local_node->nd_item);
o2nm_node_put(local_node);
out:
return ret;
}
| 0 |
PDFGen | ee58aff6918b8bbc3be29b9e3089485ea46ff956 | NOT_APPLICABLE | NOT_APPLICABLE | static pdf_object *pdf_add_raw_jpeg(struct pdf_doc *pdf,
const char *jpeg_file)
{
struct stat buf;
off_t len;
char *final_data;
uint8_t *jpeg_data;
int written = 0;
FILE *fp;
struct pdf_object *obj;
int width, height;
if (stat(jpeg_file, &buf) < 0) {
pdf_set_err(pdf, -errno, "Unable to access %s: %s", jpeg_file,
strerror(errno));
return NULL;
}
len = buf.st_size;
if ((fp = fopen(jpeg_file, "rb")) == NULL) {
pdf_set_err(pdf, -errno, "Unable to open %s: %s", jpeg_file,
strerror(errno));
return NULL;
}
jpeg_data = malloc(len);
if (!jpeg_data) {
pdf_set_err(pdf, -errno, "Unable to allocate: %zd", len);
fclose(fp);
return NULL;
}
if (fread(jpeg_data, len, 1, fp) != 1) {
pdf_set_err(pdf, -errno, "Unable to read full jpeg data");
free(jpeg_data);
fclose(fp);
return NULL;
}
fclose(fp);
if (jpeg_size(jpeg_data, len, &width, &height) < 0) {
free(jpeg_data);
pdf_set_err(pdf, -EINVAL, "Unable to determine jpeg width/height from %s",
jpeg_file);
return NULL;
}
final_data = malloc(len + 1024);
if (!final_data) {
pdf_set_err(pdf, -errno, "Unable to allocate jpeg data %zd", len + 1024);
free(jpeg_data);
return NULL;
}
written = sprintf(final_data,
"<<\r\n/Type /XObject\r\n/Name /Image%d\r\n"
"/Subtype /Image\r\n/ColorSpace /DeviceRGB\r\n"
"/Width %d\r\n/Height %d\r\n"
"/BitsPerComponent 8\r\n/Filter /DCTDecode\r\n"
"/Length %d\r\n>>stream\r\n",
flexarray_size(&pdf->objects), width, height, (int)len);
memcpy(&final_data[written], jpeg_data, len);
written += len;
written += sprintf(&final_data[written], "\r\nendstream\r\n");
free(jpeg_data);
obj = pdf_add_object(pdf, OBJ_image);
if (!obj) {
free(final_data);
return NULL;
}
obj->stream.text = final_data;
obj->stream.len = written;
return obj;
}
| 0 |
Chrome | fa17c9878dbeebf991b25ac0deb2b4635d85f1b6 | NOT_APPLICABLE | NOT_APPLICABLE | void HTMLFrameOwnerElement::SetSandboxFlags(SandboxFlags flags) {
sandbox_flags_ = flags;
container_policy_ = ConstructContainerPolicy(nullptr, nullptr);
if (ContentFrame()) {
GetDocument().GetFrame()->Client()->DidChangeFramePolicy(
ContentFrame(), sandbox_flags_, container_policy_);
}
}
| 0 |
u-boot | master | NOT_APPLICABLE | NOT_APPLICABLE | __weak void show_boot_progress(int val) {}
| 0 |
openssl | db82b8f9bd432a59aea8e1014694e15fc457c2bb | NOT_APPLICABLE | NOT_APPLICABLE | RSA *RSA_generate_key(int bits, unsigned long e_value,
void (*callback)(int,int,void *), void *cb_arg)
{
RSA *rsa=NULL;
BIGNUM *r0=NULL,*r1=NULL,*r2=NULL,*r3=NULL,*tmp;
int bitsp,bitsq,ok= -1,n=0,i;
BN_CTX *ctx=NULL,*ctx2=NULL;
ctx=BN_CTX_new();
if (ctx == NULL) goto err;
ctx2=BN_CTX_new();
if (ctx2 == NULL) goto err;
BN_CTX_start(ctx);
r0 = BN_CTX_get(ctx);
r1 = BN_CTX_get(ctx);
r2 = BN_CTX_get(ctx);
r3 = BN_CTX_get(ctx);
if (r3 == NULL) goto err;
bitsp=(bits+1)/2;
bitsq=bits-bitsp;
rsa=RSA_new();
if (rsa == NULL) goto err;
/* set e */
rsa->e=BN_new();
if (rsa->e == NULL) goto err;
#if 1
/* The problem is when building with 8, 16, or 32 BN_ULONG,
* unsigned long can be larger */
for (i=0; i<sizeof(unsigned long)*8; i++)
{
if (e_value & (1UL<<i))
BN_set_bit(rsa->e,i);
}
#else
if (!BN_set_word(rsa->e,e_value)) goto err;
#endif
/* generate p and q */
for (;;)
{
rsa->p=BN_generate_prime(NULL,bitsp,0,NULL,NULL,callback,cb_arg);
if (rsa->p == NULL) goto err;
if (!BN_sub(r2,rsa->p,BN_value_one())) goto err;
if (!BN_gcd(r1,r2,rsa->e,ctx)) goto err;
if (BN_is_one(r1)) break;
if (callback != NULL) callback(2,n++,cb_arg);
BN_free(rsa->p);
}
if (callback != NULL) callback(3,0,cb_arg);
for (;;)
{
rsa->q=BN_generate_prime(NULL,bitsq,0,NULL,NULL,callback,cb_arg);
if (rsa->q == NULL) goto err;
if (!BN_sub(r2,rsa->q,BN_value_one())) goto err;
if (!BN_gcd(r1,r2,rsa->e,ctx)) goto err;
if (BN_is_one(r1) && (BN_cmp(rsa->p,rsa->q) != 0))
break;
if (callback != NULL) callback(2,n++,cb_arg);
BN_free(rsa->q);
}
if (callback != NULL) callback(3,1,cb_arg);
if (BN_cmp(rsa->p,rsa->q) < 0)
{
tmp=rsa->p;
rsa->p=rsa->q;
rsa->q=tmp;
}
/* calculate n */
rsa->n=BN_new();
if (rsa->n == NULL) goto err;
if (!BN_mul(rsa->n,rsa->p,rsa->q,ctx)) goto err;
/* calculate d */
if (!BN_sub(r1,rsa->p,BN_value_one())) goto err; /* p-1 */
if (!BN_sub(r2,rsa->q,BN_value_one())) goto err; /* q-1 */
if (!BN_mul(r0,r1,r2,ctx)) goto err; /* (p-1)(q-1) */
/* should not be needed, since gcd(p-1,e) == 1 and gcd(q-1,e) == 1 */
/* for (;;)
{
if (!BN_gcd(r3,r0,rsa->e,ctx)) goto err;
if (BN_is_one(r3)) break;
if (1)
{
if (!BN_add_word(rsa->e,2L)) goto err;
continue;
}
RSAerr(RSA_F_RSA_GENERATE_KEY,RSA_R_BAD_E_VALUE);
goto err;
}
*/
rsa->d=BN_mod_inverse(NULL,rsa->e,r0,ctx2); /* d */
if (rsa->d == NULL) goto err;
/* calculate d mod (p-1) */
rsa->dmp1=BN_new();
if (rsa->dmp1 == NULL) goto err;
if (!BN_mod(rsa->dmp1,rsa->d,r1,ctx)) goto err;
/* calculate d mod (q-1) */
rsa->dmq1=BN_new();
if (rsa->dmq1 == NULL) goto err;
if (!BN_mod(rsa->dmq1,rsa->d,r2,ctx)) goto err;
/* calculate inverse of q mod p */
rsa->iqmp=BN_mod_inverse(NULL,rsa->q,rsa->p,ctx2);
if (rsa->iqmp == NULL) goto err;
ok=1;
err:
if (ok == -1)
{
RSAerr(RSA_F_RSA_GENERATE_KEY,ERR_LIB_BN);
ok=0;
}
BN_CTX_end(ctx);
BN_CTX_free(ctx);
BN_CTX_free(ctx2);
if (!ok)
{
if (rsa != NULL) RSA_free(rsa);
return(NULL);
}
else
return(rsa);
}
| 0 |
linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | NOT_APPLICABLE | NOT_APPLICABLE | static void unfreeze_slab(struct kmem_cache *s, struct page *page, int tail)
{
struct kmem_cache_node *n = get_node(s, page_to_nid(page));
struct kmem_cache_cpu *c = get_cpu_slab(s, smp_processor_id());
ClearSlabFrozen(page);
if (page->inuse) {
if (page->freelist) {
add_partial(n, page, tail);
stat(c, tail ? DEACTIVATE_TO_TAIL : DEACTIVATE_TO_HEAD);
} else {
stat(c, DEACTIVATE_FULL);
if (SlabDebug(page) && (s->flags & SLAB_STORE_USER))
add_full(n, page);
}
slab_unlock(page);
} else {
stat(c, DEACTIVATE_EMPTY);
if (n->nr_partial < MIN_PARTIAL) {
/*
* Adding an empty slab to the partial slabs in order
* to avoid page allocator overhead. This slab needs
* to come after the other slabs with objects in
* so that the others get filled first. That way the
* size of the partial list stays small.
*
* kmem_cache_shrink can reclaim any empty slabs from the
* partial list.
*/
add_partial(n, page, 1);
slab_unlock(page);
} else {
slab_unlock(page);
stat(get_cpu_slab(s, raw_smp_processor_id()), FREE_SLAB);
discard_slab(s, page);
}
}
}
| 0 |
linux | 95d78c28b5a85bacbc29b8dba7c04babb9b0d467 | NOT_APPLICABLE | NOT_APPLICABLE | void bio_set_pages_dirty(struct bio *bio)
{
struct bio_vec *bvec;
int i;
bio_for_each_segment_all(bvec, bio, i) {
struct page *page = bvec->bv_page;
if (page && !PageCompound(page))
set_page_dirty_lock(page);
}
}
| 0 |
tensorflow | e6340f0665d53716ef3197ada88936c2a5f7a2d3 | NOT_APPLICABLE | NOT_APPLICABLE | bool IsRewritten(const NodeDef* node) const {
// if graph rewrite happens in multiple passes without graph pruning between
// them, it's possible that rewritten node already exists in a graph
return rewritten_nodes_.find(node->name()) != rewritten_nodes_.end() ||
ctx().node_map->NodeExists(OuterNodeName(node, false)) ||
ctx().node_map->NodeExists(OuterNodeName(node, true)) ||
ctx().node_map->NodeExists(InnerAddNodeName(node));
} | 0 |
Chrome | 0c14577c9905bd8161159ec7eaac810c594508d0 | NOT_APPLICABLE | NOT_APPLICABLE | void OmniboxViewWin::OnLButtonDown(UINT keys, const CPoint& point) {
TrackMousePosition(kLeft, point);
if (gaining_focus_.get()) {
saved_selection_for_focus_change_.cpMin = -1;
DefWindowProc(WM_LBUTTONDOWN, keys, MAKELPARAM(point.x, point.y));
DefWindowProc(WM_LBUTTONUP, keys, MAKELPARAM(point.x, point.y));
}
const bool is_triple_click = tracking_double_click_ &&
views::NativeTextfieldWin::IsDoubleClick(double_click_point_, point,
GetCurrentMessage()->time - double_click_time_);
tracking_double_click_ = false;
if (!gaining_focus_.get() && !is_triple_click)
OnPossibleDrag(point);
ScopedFreeze freeze(this, GetTextObjectModel());
OnBeforePossibleChange();
DefWindowProc(WM_LBUTTONDOWN, keys,
MAKELPARAM(ClipXCoordToVisibleText(point.x, is_triple_click),
point.y));
OnAfterPossibleChange();
gaining_focus_.reset();
}
| 0 |
rpm | 8f4b3c3cab8922a2022b9e47c71f1ecf906077ef | NOT_APPLICABLE | NOT_APPLICABLE | static rpmRC hdrblobVerifyRegion(rpmTagVal regionTag, int exact_size,
hdrblob blob, char **buf)
{
rpmRC rc = RPMRC_FAIL;
struct entryInfo_s trailer, einfo;
unsigned char * regionEnd = NULL;
/* Check that we have at least on tag */
if (blob->il < 1) {
rasprintf(buf, _("region: no tags"));
goto exit;
}
/* Convert the 1st tag element. */
ei2h(blob->pe, &einfo);
if (!regionTag && (einfo.tag == RPMTAG_HEADERSIGNATURES ||
einfo.tag == RPMTAG_HEADERIMMUTABLE ||
einfo.tag == RPMTAG_HEADERIMAGE)) {
regionTag = einfo.tag;
}
/* Is there an immutable header region tag? */
if (!(einfo.tag == regionTag)) {
rc = RPMRC_NOTFOUND;
goto exit;
}
/* Is the region tag sane? */
if (!(einfo.type == REGION_TAG_TYPE && einfo.count == REGION_TAG_COUNT)) {
rasprintf(buf,
_("region tag: BAD, tag %d type %d offset %d count %d"),
einfo.tag, einfo.type, einfo.offset, einfo.count);
goto exit;
}
/* Is the trailer within the data area? */
if (hdrchkRange(blob->dl, einfo.offset + REGION_TAG_COUNT)) {
rasprintf(buf,
_("region offset: BAD, tag %d type %d offset %d count %d"),
einfo.tag, einfo.type, einfo.offset, einfo.count);
goto exit;
}
/* Is there an immutable header region tag trailer? */
memset(&trailer, 0, sizeof(trailer));
regionEnd = blob->dataStart + einfo.offset;
/* regionEnd is not guaranteed to be aligned */
(void) memcpy(&trailer, regionEnd, REGION_TAG_COUNT);
blob->rdl = einfo.offset + REGION_TAG_COUNT;
ei2h(&trailer, &einfo);
/* Some old packages have HEADERIMAGE in signature region trailer, fix up */
if (regionTag == RPMTAG_HEADERSIGNATURES && einfo.tag == RPMTAG_HEADERIMAGE)
einfo.tag = RPMTAG_HEADERSIGNATURES;
if (!(einfo.tag == regionTag &&
einfo.type == REGION_TAG_TYPE && einfo.count == REGION_TAG_COUNT))
{
rasprintf(buf,
_("region trailer: BAD, tag %d type %d offset %d count %d"),
einfo.tag, einfo.type, einfo.offset, einfo.count);
goto exit;
}
/*
* Trailer offset is negative and has a special meaning. Be sure to negate
* *after* the division, so the negation cannot overflow. The parentheses
* around the division are required!
*
* Thankfully, the modulus operator works fine on negative numbers.
*/
blob->ril = -(einfo.offset/sizeof(*blob->pe));
/* Does the region actually fit within the header? */
if ((einfo.offset % sizeof(*blob->pe)) || hdrchkRange(blob->il, blob->ril) ||
hdrchkRange(blob->dl, blob->rdl)) {
rasprintf(buf, _("region %d size: BAD, ril %d il %d rdl %d dl %d"),
regionTag, blob->ril, blob->il, blob->rdl, blob->dl);
goto exit;
}
/* In package files region size is expected to match header size. */
if (exact_size && !(blob->il == blob->ril && blob->dl == blob->rdl)) {
rasprintf(buf,
_("region %d: tag number mismatch il %d ril %d dl %d rdl %d\n"),
regionTag, blob->il, blob->ril, blob->dl, blob->rdl);
goto exit;
}
blob->regionTag = regionTag;
rc = RPMRC_OK;
exit:
return rc;
} | 0 |
ghostscript | 3ee55637480d5e319a5de0481b01c3346855cbc9 | NOT_APPLICABLE | NOT_APPLICABLE | xps_parse_glyphs_imp(xps_context_t *ctx, xps_font_t *font, float size,
float originx, float originy, int is_sideways, int bidi_level,
char *indices, char *unicode, int is_charpath, int sim_bold)
{
xps_text_buffer_t buf;
xps_glyph_metrics_t mtx;
float x = originx;
float y = originy;
char *us = unicode;
char *is = indices;
int un = 0;
int code;
buf.count = 0;
if (!unicode && !indices)
return gs_throw(-1, "no text in glyphs element");
if (us)
{
if (us[0] == '{' && us[1] == '}')
us = us + 2;
un = strlen(us);
}
while ((us && un > 0) || (is && *is))
{
int char_code = '?';
int code_count = 1;
int glyph_count = 1;
if (is && *is)
{
is = xps_parse_cluster_mapping(is, &code_count, &glyph_count);
}
if (code_count < 1)
code_count = 1;
if (glyph_count < 1)
glyph_count = 1;
while (code_count--)
{
if (us && un > 0)
{
int t = xps_utf8_to_ucs(&char_code, us, un);
if (t < 0)
return gs_rethrow(-1, "error decoding UTF-8 string");
us += t; un -= t;
}
}
while (glyph_count--)
{
int glyph_index = -1;
float u_offset = 0.0;
float v_offset = 0.0;
float advance;
if (is && *is)
is = xps_parse_glyph_index(is, &glyph_index);
if (glyph_index == -1)
glyph_index = xps_encode_font_char(font, char_code);
xps_measure_font_glyph(ctx, font, glyph_index, &mtx);
if (is_sideways)
advance = mtx.vadv * 100.0;
else if (bidi_level & 1)
advance = -mtx.hadv * 100.0;
else
advance = mtx.hadv * 100.0;
if (is && *is)
{
is = xps_parse_glyph_metrics(is, &advance, &u_offset, &v_offset, bidi_level);
if (*is == ';')
is ++;
}
if (bidi_level & 1)
u_offset = -mtx.hadv * 100 - u_offset;
u_offset = u_offset * 0.01 * size;
v_offset = v_offset * 0.01 * size;
/* Adjust glyph offset and advance width for emboldening */
if (sim_bold)
{
advance *= 1.02f;
u_offset += 0.01 * size;
v_offset += 0.01 * size;
}
if (buf.count == XPS_TEXT_BUFFER_SIZE)
{
code = xps_flush_text_buffer(ctx, font, &buf, is_charpath);
if (code)
return gs_rethrow(code, "cannot flush buffered text");
}
if (is_sideways)
{
buf.x[buf.count] = x + u_offset + (mtx.vorg * size);
buf.y[buf.count] = y - v_offset + (mtx.hadv * 0.5 * size);
}
else
{
buf.x[buf.count] = x + u_offset;
buf.y[buf.count] = y - v_offset;
}
buf.g[buf.count] = glyph_index;
buf.count ++;
x += advance * 0.01 * size;
}
}
if (buf.count > 0)
{
code = xps_flush_text_buffer(ctx, font, &buf, is_charpath);
if (code)
return gs_rethrow(code, "cannot flush buffered text");
}
return 0;
}
| 0 |
php-src | 06d309fd7a917575d65c7a6f4f57b0e6bb0f9711 | NOT_APPLICABLE | NOT_APPLICABLE | static php_iconv_err_t _php_iconv_appendl(smart_str *d, const char *s, size_t l, iconv_t cd)
{
const char *in_p = s;
size_t in_left = l;
char *out_p;
size_t out_left = 0;
size_t buf_growth = 128;
#if !ICONV_SUPPORTS_ERRNO
size_t prev_in_left = in_left;
#endif
if (in_p != NULL) {
while (in_left > 0) {
out_left = buf_growth - out_left;
{
size_t newlen;
smart_str_alloc((d), out_left, 0);
}
out_p = (d)->c + (d)->len;
if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
#if ICONV_SUPPORTS_ERRNO
switch (errno) {
case EINVAL:
return PHP_ICONV_ERR_ILLEGAL_CHAR;
case EILSEQ:
return PHP_ICONV_ERR_ILLEGAL_SEQ;
case E2BIG:
break;
default:
return PHP_ICONV_ERR_UNKNOWN;
}
#else
if (prev_in_left == in_left) {
return PHP_ICONV_ERR_UNKNOWN;
}
#endif
}
#if !ICONV_SUPPORTS_ERRNO
prev_in_left = in_left;
#endif
(d)->len += (buf_growth - out_left);
buf_growth <<= 1;
}
} else {
for (;;) {
out_left = buf_growth - out_left;
{
size_t newlen;
smart_str_alloc((d), out_left, 0);
}
out_p = (d)->c + (d)->len;
if (iconv(cd, NULL, NULL, (char **) &out_p, &out_left) == (size_t)0) {
(d)->len += (buf_growth - out_left);
break;
} else {
#if ICONV_SUPPORTS_ERRNO
if (errno != E2BIG) {
return PHP_ICONV_ERR_UNKNOWN;
}
#else
if (out_left != 0) {
return PHP_ICONV_ERR_UNKNOWN;
}
#endif
}
(d)->len += (buf_growth - out_left);
buf_growth <<= 1;
}
}
return PHP_ICONV_ERR_SUCCESS;
} | 0 |
Chrome | f2d26633cbd50735ac2af30436888b71ac0abad3 | NOT_APPLICABLE | NOT_APPLICABLE | std::unique_ptr<views::Background> AutofillPopupFooterView::CreateBackground() {
return views::CreateSolidBackground(
is_selected_ ? popup_view_->GetSelectedBackgroundColor()
: popup_view_->GetFooterBackgroundColor());
}
| 0 |
civetweb | 8fd069f6dedb064339f1091069ac96f3f8bdb552 | NOT_APPLICABLE | NOT_APPLICABLE | get_http_method_info(const char *method)
{
/* Check if the method is known to the server. The list of all known
* HTTP methods can be found here at
* http://www.iana.org/assignments/http-methods/http-methods.xhtml
*/
const struct mg_http_method_info *m = http_methods;
while (m->name) {
if (!strcmp(m->name, method)) {
return m;
}
m++;
}
return NULL;
}
| 0 |
qemu | 5cd7aa3451b76bb19c0f6adc2b931f091e5d7fcd | NOT_APPLICABLE | NOT_APPLICABLE | static void sdhci_poweron_reset(DeviceState *dev)
{
/* QOM (ie power-on) reset. This is identical to reset
* commanded via device register apart from handling of the
* 'pending insert on powerup' quirk.
*/
SDHCIState *s = (SDHCIState *)dev;
sdhci_reset(s);
if (s->pending_insert_quirk) {
s->pending_insert_state = true;
}
} | 0 |
Chrome | 9ce8793d2a8ca2cc0cb3c26fa1ca0eef3d9bc999 | NOT_APPLICABLE | NOT_APPLICABLE | int32_t PPB_URLLoader_Impl::Open(PP_Resource request_id,
scoped_refptr<TrackedCallback> callback) {
if (main_document_loader_)
return PP_ERROR_INPROGRESS;
EnterResourceNoLock<PPB_URLRequestInfo_API> enter_request(request_id, true);
if (enter_request.failed()) {
Log(PP_LOGLEVEL_ERROR,
"PPB_URLLoader.Open: invalid request resource ID. (Hint to C++ wrapper"
" users: use the ResourceRequest constructor that takes an instance or"
" else the request will be null.)");
return PP_ERROR_BADARGUMENT;
}
PPB_URLRequestInfo_Impl* request = static_cast<PPB_URLRequestInfo_Impl*>(
enter_request.object());
int32_t rv = ValidateCallback(callback);
if (rv != PP_OK)
return rv;
if (request->RequiresUniversalAccess() && !has_universal_access_) {
Log(PP_LOGLEVEL_ERROR, "PPB_URLLoader.Open: The URL you're requesting is "
" on a different security origin than your plugin. To request "
" cross-origin resources, see "
" PP_URLREQUESTPROPERTY_ALLOWCROSSORIGINREQUESTS.");
return PP_ERROR_NOACCESS;
}
if (loader_.get())
return PP_ERROR_INPROGRESS;
WebFrame* frame = GetFrameForResource(this);
if (!frame)
return PP_ERROR_FAILED;
WebURLRequest web_request;
if (!request->ToWebURLRequest(frame, &web_request))
return PP_ERROR_FAILED;
request_data_ = request->GetData();
WebURLLoaderOptions options;
if (has_universal_access_) {
options.allowCredentials = true;
options.crossOriginRequestPolicy =
WebURLLoaderOptions::CrossOriginRequestPolicyAllow;
} else {
options.untrustedHTTP = true;
if (request_data_.allow_cross_origin_requests) {
options.allowCredentials = request_data_.allow_credentials;
options.crossOriginRequestPolicy =
WebURLLoaderOptions::CrossOriginRequestPolicyUseAccessControl;
} else {
options.allowCredentials = true;
}
}
is_asynchronous_load_suspended_ = false;
loader_.reset(frame->createAssociatedURLLoader(options));
if (!loader_.get())
return PP_ERROR_FAILED;
loader_->loadAsynchronously(web_request, this);
RegisterCallback(callback);
return PP_OK_COMPLETIONPENDING;
}
| 0 |
ChakraCore | 402f3d967c0a905ec5b9ca9c240783d3f2c15724 | NOT_APPLICABLE | NOT_APPLICABLE | ParseNodePtr Parser::CreateProgNodeWithScanner(bool isModuleSource)
{
ParseNodePtr pnodeProg;
if (isModuleSource)
{
pnodeProg = CreateNodeWithScanner<knopModule>();
// knopModule is not actually handled anywhere since we would need to handle it everywhere we could
// have knopProg and it would be treated exactly the same except for import/export statements.
// We are only using it as a way to get the correct size for PnModule.
// Consider: Should we add a flag to PnProg which is false but set to true in PnModule?
// If we do, it can't be a virtual method since the parse nodes are all in a union.
pnodeProg->nop = knopProg;
}
else
{
pnodeProg = CreateNodeWithScanner<knopProg>();
}
return pnodeProg;
} | 0 |
harfbuzz | 81c8ef785b079980ad5b46be4fe7c7bf156dbf65 | NOT_APPLICABLE | NOT_APPLICABLE | HB_Error HB_Done_GPOS_Table( HB_GPOSHeader* gpos )
{
_HB_OPEN_Free_LookupList( &gpos->LookupList, HB_Type_GPOS );
_HB_OPEN_Free_FeatureList( &gpos->FeatureList );
_HB_OPEN_Free_ScriptList( &gpos->ScriptList );
FREE( gpos );
return HB_Err_Ok;
}
| 0 |
Chrome | 116d0963cadfbf55ef2ec3d13781987c4d80517a | NOT_APPLICABLE | NOT_APPLICABLE | PrintPreviewHandler::PrintPreviewHandler()
: print_backend_(printing::PrintBackend::CreateInstance(NULL)),
regenerate_preview_request_count_(0),
manage_printers_dialog_request_count_(0),
manage_cloud_printers_dialog_request_count_(0),
reported_failed_preview_(false),
has_logged_printers_count_(false) {
ReportUserActionHistogram(PREVIEW_STARTED);
}
| 0 |
Chrome | 69ec52bd0b32622770a25952386596ccb4ad6434 | NOT_APPLICABLE | NOT_APPLICABLE | base::Optional<MinMaxSize> NGFlexLayoutAlgorithm::ComputeMinMaxSize(
const MinMaxSizeInput& input) const {
return base::nullopt;
}
| 0 |
php-src | 863d37ea66d5c960db08d6f4a2cbd2518f0f80d1 | NOT_APPLICABLE | NOT_APPLICABLE | void gdImageColorTransparent (gdImagePtr im, int color)
{
if (color < 0) {
return;
}
if (!im->trueColor) {
if((color >= im->colorsTotal)) {
return;
}
/* Make the old transparent color opaque again */
if (im->transparent != -1) {
im->alpha[im->transparent] = gdAlphaOpaque;
}
im->alpha[color] = gdAlphaTransparent;
}
im->transparent = color;
}
| 0 |
ImageMagick | 948356eec65aea91995d4b7cc487d197d2c5f602 | NOT_APPLICABLE | NOT_APPLICABLE | static void TerminateSource(j_decompress_ptr cinfo)
{
(void) cinfo;
}
| 0 |
gpac | ce01bd15f711d4575b7424b54b3a395ec64c1784 | NOT_APPLICABLE | NOT_APPLICABLE |
void dump_isom_timed_text(GF_ISOFile *file, GF_ISOTrackID trackID, char *inName, Bool is_final_name, Bool is_convert, GF_TextDumpType dump_type)
{
FILE *dump;
GF_Err e;
u32 track;
track = gf_isom_get_track_by_id(file, trackID);
if (!track) {
fprintf(stderr, "Cannot find track ID %d\n", trackID);
return;
}
switch (gf_isom_get_media_type(file, track)) {
case GF_ISOM_MEDIA_TEXT:
case GF_ISOM_MEDIA_SUBT:
break;
default:
fprintf(stderr, "Track ID %d is not a 3GPP text track\n", trackID);
return;
}
if (inName) {
char szBuf[1024];
char *ext;
ext = ((dump_type==GF_TEXTDUMPTYPE_SVG) ? "svg" : ((dump_type==GF_TEXTDUMPTYPE_SRT) ? "srt" : "ttxt"));
if (is_final_name) {
strcpy(szBuf, inName) ;
} else if (is_convert)
sprintf(szBuf, "%s.%s", inName, ext) ;
else
sprintf(szBuf, "%s_%d_text.%s", inName, trackID, ext);
dump = gf_fopen(szBuf, "wt");
if (!dump) {
fprintf(stderr, "Failed to open %s for dumping\n", szBuf);
return;
}
} else {
dump = stdout;
}
e = gf_isom_text_dump(file, track, dump, dump_type);
if (inName) gf_fclose(dump);
if (e) fprintf(stderr, "Conversion failed (%s)\n", gf_error_to_string(e)); | 0 |
linux | 4e7c22d447bb6d7e37bfe39ff658486ae78e8d77 | NOT_APPLICABLE | NOT_APPLICABLE | static unsigned long randomize_stack_top(unsigned long stack_top)
{
unsigned long random_variable = 0;
if ((current->flags & PF_RANDOMIZE) &&
!(current->personality & ADDR_NO_RANDOMIZE)) {
random_variable = (unsigned long) get_random_int();
random_variable &= STACK_RND_MASK;
random_variable <<= PAGE_SHIFT;
}
#ifdef CONFIG_STACK_GROWSUP
return PAGE_ALIGN(stack_top) + random_variable;
#else
return PAGE_ALIGN(stack_top) - random_variable;
#endif
}
| 0 |
radare2 | 10517e3ff0e609697eb8cde60ec8dc999ee5ea24 | NOT_APPLICABLE | NOT_APPLICABLE | static bool __core_anal_fcn(RCore *core, ut64 at, ut64 from, int reftype, int depth) {
if (depth < 0) {
// printf ("Too deep for 0x%08"PFMT64x"\n", at);
// r_sys_backtrace ();
return false;
}
int has_next = r_config_get_i (core->config, "anal.hasnext");
RAnalHint *hint = NULL;
int i, nexti = 0;
ut64 *next = NULL;
int fcnlen;
RAnalFunction *fcn = r_anal_function_new (core->anal);
r_warn_if_fail (fcn);
const char *fcnpfx = r_config_get (core->config, "anal.fcnprefix");
if (!fcnpfx) {
fcnpfx = "fcn";
}
const char *cc = r_anal_cc_default (core->anal);
if (!cc) {
if (r_anal_cc_once (core->anal)) {
eprintf ("Warning: set your favourite calling convention in `e anal.cc=?`\n");
}
cc = "reg";
}
fcn->cc = r_str_constpool_get (&core->anal->constpool, cc);
r_warn_if_fail (fcn->cc);
hint = r_anal_hint_get (core->anal, at);
if (hint && hint->bits == 16) {
// expand 16bit for function
fcn->bits = 16;
} else {
fcn->bits = core->anal->bits;
}
fcn->addr = at;
fcn->name = get_function_name (core, at);
if (!fcn->name) {
fcn->name = r_str_newf ("%s.%08"PFMT64x, fcnpfx, at);
}
r_anal_function_invalidate_read_ahead_cache ();
do {
RFlagItem *f;
ut64 delta = r_anal_function_linear_size (fcn);
if (!r_io_is_valid_offset (core->io, at + delta, !core->anal->opt.noncode)) {
goto error;
}
if (r_cons_is_breaked ()) {
break;
}
fcnlen = r_anal_function(core->anal, fcn, at + delta, core->anal->opt.bb_max_size, reftype);
if (core->anal->opt.searchstringrefs) {
r_anal_set_stringrefs (core, fcn);
}
if (fcnlen == 0) {
if (core->anal->verbose) {
eprintf ("Analyzed function size is 0 at 0x%08"PFMT64x"\n", at + delta);
}
goto error;
}
if (fcnlen < 0) {
switch (fcnlen) {
case R_ANAL_RET_ERROR:
case R_ANAL_RET_NEW:
case R_ANAL_RET_DUP:
case R_ANAL_RET_END:
break;
default:
eprintf ("Oops. Negative fcnsize at 0x%08"PFMT64x" (%d)\n", at, fcnlen);
continue;
}
}
f = r_core_flag_get_by_spaces (core->flags, fcn->addr);
set_fcn_name_from_flag (fcn, f, fcnpfx);
if (fcnlen == R_ANAL_RET_ERROR ||
(fcnlen == R_ANAL_RET_END && !r_anal_function_realsize (fcn))) { /* Error analyzing function */
if (core->anal->opt.followbrokenfcnsrefs) {
r_anal_analyze_fcn_refs (core, fcn, depth);
}
goto error;
} else if (fcnlen == R_ANAL_RET_END) { /* Function analysis complete */
f = r_core_flag_get_by_spaces (core->flags, fcn->addr);
if (f && f->name && strncmp (f->name, "sect", 4)) { /* Check if it's already flagged */
char *new_name = strdup (f->name);
if (is_entry_flag (f)) {
RListIter *iter;
RBinSymbol *sym;
const RList *syms = r_bin_get_symbols (core->bin);
ut64 baddr = r_config_get_i (core->config, "bin.baddr");
r_list_foreach (syms, iter, sym) {
if (sym->type && (sym->paddr + baddr) == fcn->addr && !strcmp (sym->type, R_BIN_TYPE_FUNC_STR)) {
free (new_name);
new_name = r_str_newf ("sym.%s", sym->name);
break;
}
}
}
free (fcn->name);
fcn->name = new_name;
} else {
R_FREE (fcn->name);
const char *fcnpfx = r_anal_functiontype_tostring (fcn->type);
if (!fcnpfx || !*fcnpfx || !strcmp (fcnpfx, "fcn")) {
fcnpfx = r_config_get (core->config, "anal.fcnprefix");
}
fcn->name = r_str_newf ("%s.%08"PFMT64x, fcnpfx, fcn->addr);
autoname_imp_trampoline (core, fcn);
/* Add flag */
r_flag_space_push (core->flags, R_FLAGS_FS_FUNCTIONS);
r_flag_set (core->flags, fcn->name, fcn->addr, r_anal_function_linear_size (fcn));
r_flag_space_pop (core->flags);
}
/* New function: Add initial xref */
if (from != UT64_MAX) {
r_anal_xrefs_set (core->anal, from, fcn->addr, reftype);
}
// XXX: this is wrong. See CID 1134565
r_anal_add_function (core->anal, fcn);
if (has_next) {
ut64 addr = r_anal_function_max_addr (fcn);
RIOMap *map = r_io_map_get_at (core->io, addr);
// only get next if found on an executable section
if (!map || (map && map->perm & R_PERM_X)) {
for (i = 0; i < nexti; i++) {
if (next[i] == addr) {
break;
}
}
if (i == nexti) {
ut64 at = r_anal_function_max_addr (fcn);
while (true) {
ut64 size;
RAnalMetaItem *mi = r_meta_get_at (core->anal, at, R_META_TYPE_ANY, &size);
if (!mi) {
break;
}
at += size;
}
// TODO: ensure next address is function after padding (nop or trap or wat)
// XXX noisy for test cases because we want to clear the stderr
r_cons_clear_line (1);
loganal (fcn->addr, at, 10000 - depth);
next = next_append (next, &nexti, at);
}
}
}
if (!r_anal_analyze_fcn_refs (core, fcn, depth)) {
goto error;
}
}
} while (fcnlen != R_ANAL_RET_END);
r_list_free (core->anal->leaddrs);
core->anal->leaddrs = NULL;
if (has_next) {
for (i = 0; i < nexti; i++) {
if (!next[i] || r_anal_get_fcn_in (core->anal, next[i], 0)) {
continue;
}
r_core_anal_fcn (core, next[i], from, 0, depth - 1);
}
free (next);
}
if (core->anal->cur && core->anal->cur->arch && !strcmp (core->anal->cur->arch, "x86")) {
r_anal_function_check_bp_use (fcn);
if (fcn && !fcn->bp_frame) {
r_anal_function_delete_vars_by_kind (fcn, R_ANAL_VAR_KIND_BPV);
}
}
r_anal_hint_free (hint);
return true;
error:
r_list_free (core->anal->leaddrs);
core->anal->leaddrs = NULL;
// ugly hack to free fcn
if (fcn) {
if (!r_anal_function_realsize (fcn) || fcn->addr == UT64_MAX) {
r_anal_function_free (fcn);
fcn = NULL;
} else {
// TODO: mark this function as not properly analyzed
if (!fcn->name) {
// XXX dupped code.
fcn->name = r_str_newf (
"%s.%08" PFMT64x,
r_anal_functiontype_tostring (fcn->type),
at);
/* Add flag */
r_flag_space_push (core->flags, R_FLAGS_FS_FUNCTIONS);
r_flag_set (core->flags, fcn->name, at, r_anal_function_linear_size (fcn));
r_flag_space_pop (core->flags);
}
r_anal_add_function (core->anal, fcn);
}
if (fcn && has_next) {
ut64 newaddr = r_anal_function_max_addr (fcn);
RIOMap *map = r_io_map_get_at (core->io, newaddr);
if (!map || (map && (map->perm & R_PERM_X))) {
next = next_append (next, &nexti, newaddr);
for (i = 0; i < nexti; i++) {
if (!next[i]) {
continue;
}
r_core_anal_fcn (core, next[i], next[i], 0, depth - 1);
}
free (next);
}
}
}
if (fcn && core->anal->cur && core->anal->cur->arch && !strcmp (core->anal->cur->arch, "x86")) {
r_anal_function_check_bp_use (fcn);
if (!fcn->bp_frame) {
r_anal_function_delete_vars_by_kind (fcn, R_ANAL_VAR_KIND_BPV);
}
}
r_anal_hint_free (hint);
return false;
} | 0 |
cyrus-imapd | 6bd33275368edfa71ae117de895488584678ac79 | NOT_APPLICABLE | NOT_APPLICABLE | EXPORTED int mboxlist_usermboxtree(const char *userid, mboxlist_cb *proc,
void *rock, int flags)
{
char *inbox = mboxname_user_mbox(userid, 0);
int r = mboxlist_mboxtree(inbox, proc, rock, flags);
if (flags & MBOXTREE_PLUS_RACL) {
struct allmb_rock mbrock = { NULL, flags, proc, rock };
/* we're using reverse ACLs */
struct buf buf = BUF_INITIALIZER;
strarray_t matches = STRARRAY_INITIALIZER;
/* user items */
mboxlist_racl_key(1, userid, NULL, &buf);
/* this is the prefix */
struct raclrock raclrock = { buf.len, &matches };
/* we only need to look inside the prefix still, but we keep the length
* in raclrock pointing to the start of the mboxname part of the key so
* we get correct names in matches */
r = cyrusdb_foreach(mbdb, buf.s, buf.len, NULL, racl_cb, &raclrock, NULL);
buf_reset(&buf);
/* shared items */
mboxlist_racl_key(0, userid, NULL, &buf);
raclrock.prefixlen = buf.len;
if (!r) r = cyrusdb_foreach(mbdb, buf.s, buf.len, NULL, racl_cb, &raclrock, NULL);
/* XXX - later we need to sort the array when we've added groups */
int i;
for (i = 0; !r && i < strarray_size(&matches); i++) {
const char *mboxname = strarray_nth(&matches, i);
r = cyrusdb_forone(mbdb, mboxname, strlen(mboxname), allmbox_p, allmbox_cb, &mbrock, 0);
}
buf_free(&buf);
strarray_fini(&matches);
mboxlist_entry_free(&mbrock.mbentry);
}
free(inbox);
return r;
}
| 0 |
exempi | 886cd1d2314755adb1f4cdb99c16ff00830f0331 | NOT_APPLICABLE | NOT_APPLICABLE | static XMP_StringPtr GetXMPLang ( XMP_Uns16 macLang )
{
XMP_StringPtr xmpLang = "";
if ( macLang <= 94 ) {
xmpLang = kMacToXMPLang_0_94[macLang];
} else if ( (128 <= macLang) && (macLang <= 151) ) {
xmpLang = kMacToXMPLang_128_151[macLang-128];
}
return xmpLang;
} // GetXMPLang
| 0 |
libreport | 257578a23d1537a2d235aaa2b1488ee4f818e360 | NOT_APPLICABLE | NOT_APPLICABLE | static void create_details_treeview(void)
{
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
renderer = gtk_cell_renderer_toggle_new();
column = gtk_tree_view_column_new_with_attributes(
_("Include"), renderer,
/* which "attr" of renderer to set from which COLUMN? (can be repeated) */
"active", DETAIL_COLUMN_CHECKBOX,
NULL);
g_tv_details_col_checkbox = column;
gtk_tree_view_append_column(g_tv_details, column);
/* This column has a handler */
g_signal_connect(renderer, "toggled", G_CALLBACK(g_tv_details_checkbox_toggled), NULL);
renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(
_("Name"), renderer,
"text", DETAIL_COLUMN_NAME,
NULL);
gtk_tree_view_append_column(g_tv_details, column);
/* This column has a clickable header for sorting */
gtk_tree_view_column_set_sort_column_id(column, DETAIL_COLUMN_NAME);
g_tv_details_renderer_value = renderer = gtk_cell_renderer_text_new();
g_signal_connect(renderer, "edited", G_CALLBACK(save_edited_one_liner), NULL);
column = gtk_tree_view_column_new_with_attributes(
_("Value"), renderer,
"text", DETAIL_COLUMN_VALUE,
NULL);
gtk_tree_view_append_column(g_tv_details, column);
/* This column has a clickable header for sorting */
gtk_tree_view_column_set_sort_column_id(column, DETAIL_COLUMN_VALUE);
/*
renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(
_("Path"), renderer,
"text", DETAIL_COLUMN_PATH,
NULL);
gtk_tree_view_append_column(g_tv_details, column);
*/
g_ls_details = gtk_list_store_new(DETAIL_NUM_COLUMNS, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING);
gtk_tree_view_set_model(g_tv_details, GTK_TREE_MODEL(g_ls_details));
g_signal_connect(g_tv_details, "row-activated", G_CALLBACK(tv_details_row_activated), NULL);
g_signal_connect(g_tv_details, "cursor-changed", G_CALLBACK(tv_details_cursor_changed), NULL);
/* [Enter] on a row:
* g_signal_connect(g_tv_details, "select-cursor-row", G_CALLBACK(tv_details_select_cursor_row), NULL);
*/
}
| 0 |
mruby | 27d1e0132a0804581dca28df042e7047fd27eaa8 | NOT_APPLICABLE | NOT_APPLICABLE | mrb_ary_modify(mrb_state *mrb, struct RArray* a)
{
mrb_write_barrier(mrb, (struct RBasic*)a);
ary_modify(mrb, a);
} | 0 |
Chrome | e34e01b1b0987e418bc22e3ef1cf2e4ecaead264 | NOT_APPLICABLE | NOT_APPLICABLE | const char* RendererSchedulerImpl::UseCaseToString(UseCase use_case) {
switch (use_case) {
case UseCase::kNone:
return "none";
case UseCase::kCompositorGesture:
return "compositor_gesture";
case UseCase::kMainThreadCustomInputHandling:
return "main_thread_custom_input_handling";
case UseCase::kSynchronizedGesture:
return "synchronized_gesture";
case UseCase::kTouchstart:
return "touchstart";
case UseCase::kLoading:
return "loading";
case UseCase::kMainThreadGesture:
return "main_thread_gesture";
default:
NOTREACHED();
return nullptr;
}
}
| 0 |
cracklib | 33d7fa4585247cd2247a1ffa032ad245836c6edb | NOT_APPLICABLE | NOT_APPLICABLE | Purge(string, target) /* returns pointer to a purged copy */
register char *string;
register char target;
{
register char *ptr;
static char area[STRINGSIZE];
ptr = area;
while (*string)
{
if (*string != target)
{
*(ptr++) = *string;
}
string++;
}
*ptr = '\0';
return (area);
} | 0 |
Chrome | 47a054e9ad826421b789097d82b44c102ab6ac97 | NOT_APPLICABLE | NOT_APPLICABLE | void FrameLoader::detachChildren()
{
typedef Vector<RefPtr<Frame> > FrameVector;
FrameVector childrenToDetach;
childrenToDetach.reserveCapacity(m_frame->tree()->childCount());
for (Frame* child = m_frame->tree()->lastChild(); child; child = child->tree()->previousSibling())
childrenToDetach.append(child);
FrameVector::iterator end = childrenToDetach.end();
for (FrameVector::iterator it = childrenToDetach.begin(); it != end; it++)
(*it)->loader()->detachFromParent();
}
| 0 |
Chrome | a151041807a7e3c702c5f935a742368333aa69d4 | NOT_APPLICABLE | NOT_APPLICABLE | GpuProcessHostUIShim::~GpuProcessHostUIShim() {
DCHECK(CalledOnValidThread());
g_hosts_by_id.Pointer()->Remove(host_id_);
DictionaryValue* dict = new DictionaryValue();
dict->SetInteger("level", logging::LOG_ERROR);
dict->SetString("header", "GpuProcessHostUIShim");
dict->SetString("message", "GPU Process Crashed.");
GpuDataManagerImpl::GetInstance()->AddLogMessage(dict);
}
| 0 |
didiwiki | 5e5c796617e1712905dc5462b94bd5e6c08d15ea | NOT_APPLICABLE | NOT_APPLICABLE | file_write(char *filename, char *data)
{
FILE* fp;
int bytes_written = 0;
int len = strlen(data); /* clip off extra '\0' */
if (!(fp = fopen(filename, "wb")))
return -1;
while ( len > 0 )
{
bytes_written = fwrite(data, sizeof(char), len, fp);
len = len - bytes_written;
data = data + bytes_written;
}
fclose(fp);
return 1;
}
| 0 |
neomutt | 36a29280448097f34ce9c94606195f2ac643fed1 | CVE-2018-14349 | CWE-20 | static int cmd_handle_untagged(struct ImapData *idata)
{
unsigned int count = 0;
char *s = imap_next_word(idata->buf);
char *pn = imap_next_word(s);
if ((idata->state >= IMAP_SELECTED) && isdigit((unsigned char) *s))
{
pn = s;
s = imap_next_word(s);
/* EXISTS and EXPUNGE are always related to the SELECTED mailbox for the
* connection, so update that one.
*/
if (mutt_str_strncasecmp("EXISTS", s, 6) == 0)
{
mutt_debug(2, "Handling EXISTS\n");
/* new mail arrived */
if (mutt_str_atoui(pn, &count) < 0)
{
mutt_debug(1, "Malformed EXISTS: '%s'\n", pn);
}
if (!(idata->reopen & IMAP_EXPUNGE_PENDING) && count < idata->max_msn)
{
/* Notes 6.0.3 has a tendency to report fewer messages exist than
* it should. */
mutt_debug(1, "Message count is out of sync\n");
return 0;
}
/* at least the InterChange server sends EXISTS messages freely,
* even when there is no new mail */
else if (count == idata->max_msn)
mutt_debug(3, "superfluous EXISTS message.\n");
else
{
if (!(idata->reopen & IMAP_EXPUNGE_PENDING))
{
mutt_debug(2, "New mail in %s - %d messages total.\n", idata->mailbox, count);
idata->reopen |= IMAP_NEWMAIL_PENDING;
}
idata->new_mail_count = count;
}
}
/* pn vs. s: need initial seqno */
else if (mutt_str_strncasecmp("EXPUNGE", s, 7) == 0)
cmd_parse_expunge(idata, pn);
else if (mutt_str_strncasecmp("FETCH", s, 5) == 0)
cmd_parse_fetch(idata, pn);
}
else if (mutt_str_strncasecmp("CAPABILITY", s, 10) == 0)
cmd_parse_capability(idata, s);
else if (mutt_str_strncasecmp("OK [CAPABILITY", s, 14) == 0)
cmd_parse_capability(idata, pn);
else if (mutt_str_strncasecmp("OK [CAPABILITY", pn, 14) == 0)
cmd_parse_capability(idata, imap_next_word(pn));
else if (mutt_str_strncasecmp("LIST", s, 4) == 0)
cmd_parse_list(idata, s);
else if (mutt_str_strncasecmp("LSUB", s, 4) == 0)
cmd_parse_lsub(idata, s);
else if (mutt_str_strncasecmp("MYRIGHTS", s, 8) == 0)
cmd_parse_myrights(idata, s);
else if (mutt_str_strncasecmp("SEARCH", s, 6) == 0)
cmd_parse_search(idata, s);
else if (mutt_str_strncasecmp("STATUS", s, 6) == 0)
cmd_parse_status(idata, s);
else if (mutt_str_strncasecmp("ENABLED", s, 7) == 0)
cmd_parse_enabled(idata, s);
else if (mutt_str_strncasecmp("BYE", s, 3) == 0)
{
mutt_debug(2, "Handling BYE\n");
/* check if we're logging out */
if (idata->status == IMAP_BYE)
return 0;
/* server shut down our connection */
s += 3;
SKIPWS(s);
mutt_error("%s", s);
cmd_handle_fatal(idata);
return -1;
}
else if (ImapServernoise && (mutt_str_strncasecmp("NO", s, 2) == 0))
{
mutt_debug(2, "Handling untagged NO\n");
/* Display the warning message from the server */
mutt_error("%s", s + 3);
}
return 0;
}
| 1 |
linux | fb58fdcd295b914ece1d829b24df00a17a9624bc | NOT_APPLICABLE | NOT_APPLICABLE | static void domain_remove_dev_info(struct dmar_domain *domain)
{
struct device_domain_info *info, *tmp;
unsigned long flags;
spin_lock_irqsave(&device_domain_lock, flags);
list_for_each_entry_safe(info, tmp, &domain->devices, link)
__dmar_remove_one_dev_info(info);
spin_unlock_irqrestore(&device_domain_lock, flags);
} | 0 |
curl | 058f98dc3fe595f21dc26a5b9b1699e519ba5705 | NOT_APPLICABLE | NOT_APPLICABLE | Curl_conncache_find_bundle(struct Curl_easy *data,
struct connectdata *conn,
struct conncache *connc,
const char **hostp)
{
struct connectbundle *bundle = NULL;
CONNCACHE_LOCK(data);
if(connc) {
char key[HASHKEY_SIZE];
hashkey(conn, key, sizeof(key), hostp);
bundle = Curl_hash_pick(&connc->hash, key, strlen(key));
}
return bundle;
} | 0 |
libarchive | 94821008d6eea81e315c5881cdf739202961040a | NOT_APPLICABLE | NOT_APPLICABLE | DEFINE_TEST(test_read_format_rar5_extra_field_version)
{
PROLOGUE("test_read_format_rar5_extra_field_version.rar");
assertA(0 == archive_read_next_header(a, &ae));
assertEqualString("bin/2to3;1", archive_entry_pathname(ae));
assertA(0 == extract_one(a, ae, 0xF24181B7));
assertA(0 == archive_read_next_header(a, &ae));
assertEqualString("bin/2to3", archive_entry_pathname(ae));
assertA(0 == extract_one(a, ae, 0xF24181B7));
assertA(ARCHIVE_EOF == archive_read_next_header(a, &ae));
EPILOGUE();
} | 0 |
tcpdump | 5edf405d7ed9fc92f4f43e8a3d44baa4c6387562 | NOT_APPLICABLE | NOT_APPLICABLE | prism_if_print(netdissect_options *ndo,
const struct pcap_pkthdr *h, const u_char *p)
{
u_int caplen = h->caplen;
u_int length = h->len;
uint32_t msgcode;
if (caplen < 4) {
ND_PRINT((ndo, "%s", tstr));
return caplen;
}
msgcode = EXTRACT_32BITS(p);
if (msgcode == WLANCAP_MAGIC_COOKIE_V1 ||
msgcode == WLANCAP_MAGIC_COOKIE_V2)
return ieee802_11_avs_radio_print(ndo, p, length, caplen);
if (caplen < PRISM_HDR_LEN) {
ND_PRINT((ndo, "%s", tstr));
return caplen;
}
return PRISM_HDR_LEN + ieee802_11_print(ndo, p + PRISM_HDR_LEN,
length - PRISM_HDR_LEN, caplen - PRISM_HDR_LEN, 0, 0);
}
| 0 |
gnutls | 3db352734472d851318944db13be73da61300568 | NOT_APPLICABLE | NOT_APPLICABLE | static void _wrap_gmac_digest(void *_ctx, size_t length, uint8_t *digest)
{
struct gmac_ctx *ctx = _ctx;
if (ctx->pos)
gcm_update(&ctx->ctx, &ctx->key, ctx->pos, ctx->buffer);
gcm_digest(&ctx->ctx, &ctx->key, &ctx->cipher, ctx->encrypt, length, digest);
ctx->pos = 0;
} | 0 |
libvncserver | ca2a5ac02fbbadd0a21fabba779c1ea69173d10b | NOT_APPLICABLE | NOT_APPLICABLE | EnableFileTransfer(rfbBool enable)
{
fileTransferEnabled = enable;
} | 0 |
linux | 30a61ddf8117c26ac5b295e1233eaa9629a94ca3 | NOT_APPLICABLE | NOT_APPLICABLE | pgoff_t get_next_page_offset(struct dnode_of_data *dn, pgoff_t pgofs)
{
const long direct_index = ADDRS_PER_INODE(dn->inode);
const long direct_blks = ADDRS_PER_BLOCK;
const long indirect_blks = ADDRS_PER_BLOCK * NIDS_PER_BLOCK;
unsigned int skipped_unit = ADDRS_PER_BLOCK;
int cur_level = dn->cur_level;
int max_level = dn->max_level;
pgoff_t base = 0;
if (!dn->max_level)
return pgofs + 1;
while (max_level-- > cur_level)
skipped_unit *= NIDS_PER_BLOCK;
switch (dn->max_level) {
case 3:
base += 2 * indirect_blks;
case 2:
base += 2 * direct_blks;
case 1:
base += direct_index;
break;
default:
f2fs_bug_on(F2FS_I_SB(dn->inode), 1);
}
return ((pgofs - base) / skipped_unit + 1) * skipped_unit + base;
}
| 0 |
FreeRDP | 06c32f170093a6ecde93e3bc07fed6a706bfbeb3 | NOT_APPLICABLE | NOT_APPLICABLE | static BOOL video_onMappedGeometryUpdate(MAPPED_GEOMETRY* geometry)
{
PresentationContext* presentation = (PresentationContext*)geometry->custom;
RDP_RECT* r = &geometry->geometry.boundingRect;
WLog_DBG(TAG, "geometry updated topGeom=(%d,%d-%dx%d) geom=(%d,%d-%dx%d) rects=(%d,%d-%dx%d)",
geometry->topLevelLeft, geometry->topLevelTop,
geometry->topLevelRight - geometry->topLevelLeft,
geometry->topLevelBottom - geometry->topLevelTop,
geometry->left, geometry->top, geometry->right - geometry->left,
geometry->bottom - geometry->top,
r->x, r->y, r->width, r->height);
presentation->surface->x = geometry->topLevelLeft + geometry->left;
presentation->surface->y = geometry->topLevelTop + geometry->top;
return TRUE;
} | 0 |
linux | a8c1f65c79cbbb2f7da782d4c9d15639a9b94b27 | NOT_APPLICABLE | NOT_APPLICABLE | void ip_mc_unmap(struct in_device *in_dev)
{
struct ip_mc_list *pmc;
ASSERT_RTNL();
for_each_pmc_rtnl(in_dev, pmc)
igmp_group_dropped(pmc);
}
| 0 |
savannah | 135c3faebb96f8f550bd4f318716f2e1e095a969 | NOT_APPLICABLE | NOT_APPLICABLE | cf2_free_instance( void* ptr )
{
CF2_Font font = (CF2_Font)ptr;
if ( font )
{
FT_Memory memory = font->memory;
(void)memory;
}
}
| 0 |
linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | NOT_APPLICABLE | NOT_APPLICABLE | static void cred_init_security(void)
{
struct cred *cred = (struct cred *) current->real_cred;
struct task_security_struct *tsec;
tsec = selinux_cred(cred);
tsec->osid = tsec->sid = SECINITSID_KERNEL;
} | 0 |
curl | 8c7ee9083d0d719d0a77ab20d9cc2ae84eeea7f3 | NOT_APPLICABLE | NOT_APPLICABLE | static bool is_fatal_error(CURLcode code)
{
switch(code) {
case CURLE_FAILED_INIT:
case CURLE_OUT_OF_MEMORY:
case CURLE_UNKNOWN_OPTION:
case CURLE_FUNCTION_NOT_FOUND:
case CURLE_BAD_FUNCTION_ARGUMENT:
/* critical error */
return TRUE;
default:
break;
}
/* no error or not critical */
return FALSE;
} | 0 |
vim | a4bc2dd7cccf5a4a9f78b58b6f35a45d17164323 | NOT_APPLICABLE | NOT_APPLICABLE | f_getchar(typval_T *argvars, typval_T *rettv)
{
getchar_common(argvars, rettv);
} | 0 |
Chrome | 2f663de43634c1197a7a2ed8afc12cb6dc565bd0 | NOT_APPLICABLE | NOT_APPLICABLE | bool GLSurfaceOzoneEGL::ScheduleOverlayPlane(int z_order,
OverlayTransform transform,
GLImage* image,
const Rect& bounds_rect,
const RectF& crop_rect) {
return image->ScheduleOverlayPlane(widget_, z_order, transform, bounds_rect,
crop_rect);
}
| 0 |
LibRaw | f1394822a0152ceed77815eafa5cac4e8baab10a | NOT_APPLICABLE | NOT_APPLICABLE | void CLASS process_Sony_0x9403(uchar *buf) {
short bufx = SonySubstitution[buf[4]];
if ((bufx == 0x00) ||
(bufx == 0x94)) return;
imgdata.other.SensorTemperature = (float) ((short) SonySubstitution[buf[5]]);
return;
} | 0 |
linux | ac795161c93699d600db16c1a8cc23a65a1eceaf | NOT_APPLICABLE | NOT_APPLICABLE | static void nfs_dentry_remove_handle_error(struct inode *dir,
struct dentry *dentry, int error)
{
switch (error) {
case -ENOENT:
d_delete(dentry);
nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
break;
case 0:
nfs_d_prune_case_insensitive_aliases(d_inode(dentry));
nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
}
} | 0 |
curl | facb0e4662415b5f28163e853dc6742ac5fafb3d | NOT_APPLICABLE | NOT_APPLICABLE | static int tftp_getsock(struct connectdata *conn, curl_socket_t *socks)
{
socks[0] = conn->sock[FIRSTSOCKET];
return GETSOCK_READSOCK(0);
} | 0 |
sqlite | 54d501092d88c0cf89bec4279951f548fb0b8618 | NOT_APPLICABLE | NOT_APPLICABLE | static void zipfileTableErr(ZipfileTab *pTab, const char *zFmt, ...){
va_list ap;
va_start(ap, zFmt);
sqlite3_free(pTab->base.zErrMsg);
pTab->base.zErrMsg = sqlite3_vmprintf(zFmt, ap);
va_end(ap);
} | 0 |
gst-plugins-good | d0949baf3dadea6021d54abef6802fed5a06af75 | NOT_APPLICABLE | NOT_APPLICABLE | gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream,
guint32 seg_idx, GstClockTime offset)
{
QtDemuxSegment *segment;
guint32 index, kf_index;
GstClockTime start = 0, stop = GST_CLOCK_TIME_NONE;
GST_LOG_OBJECT (stream->pad, "activate segment %d, offset %" GST_TIME_FORMAT,
seg_idx, GST_TIME_ARGS (offset));
if (!gst_qtdemux_stream_update_segment (qtdemux, stream, seg_idx, offset,
&start, &stop))
return FALSE;
segment = &stream->segments[stream->segment_index];
/* in the fragmented case, we pick a fragment that starts before our
* desired position and rely on downstream to wait for a keyframe
* (FIXME: doesn't seem to work so well with ismv and wmv, as no parser; the
* tfra entries tells us which trun/sample the key unit is in, but we don't
* make use of this additional information at the moment) */
if (qtdemux->fragmented) {
stream->to_sample = G_MAXUINT32;
return TRUE;
}
/* We don't need to look for a sample in push-based */
if (!qtdemux->pullbased)
return TRUE;
/* and move to the keyframe before the indicated media time of the
* segment */
if (G_LIKELY (!QTSEGMENT_IS_EMPTY (segment))) {
if (qtdemux->segment.rate >= 0) {
index = gst_qtdemux_find_index_linear (qtdemux, stream, start);
stream->to_sample = G_MAXUINT32;
GST_DEBUG_OBJECT (stream->pad,
"moving data pointer to %" GST_TIME_FORMAT ", index: %u, pts %"
GST_TIME_FORMAT, GST_TIME_ARGS (start), index,
GST_TIME_ARGS (QTSAMPLE_PTS (stream, &stream->samples[index])));
} else {
index = gst_qtdemux_find_index_linear (qtdemux, stream, stop);
stream->to_sample = index;
GST_DEBUG_OBJECT (stream->pad,
"moving data pointer to %" GST_TIME_FORMAT ", index: %u, pts %"
GST_TIME_FORMAT, GST_TIME_ARGS (stop), index,
GST_TIME_ARGS (QTSAMPLE_PTS (stream, &stream->samples[index])));
}
} else {
GST_DEBUG_OBJECT (stream->pad, "No need to look for keyframe, "
"this is an empty segment");
return TRUE;
}
/* gst_qtdemux_parse_sample () called from gst_qtdemux_find_index_linear ()
* encountered an error and printed a message so we return appropriately */
if (index == -1)
return FALSE;
/* we're at the right spot */
if (index == stream->sample_index) {
GST_DEBUG_OBJECT (stream->pad, "we are at the right index");
return TRUE;
}
/* find keyframe of the target index */
kf_index = gst_qtdemux_find_keyframe (qtdemux, stream, index);
/* *INDENT-OFF* */
/* indent does stupid stuff with stream->samples[].timestamp */
/* if we move forwards, we don't have to go back to the previous
* keyframe since we already sent that. We can also just jump to
* the keyframe right before the target index if there is one. */
if (index > stream->sample_index) {
/* moving forwards check if we move past a keyframe */
if (kf_index > stream->sample_index) {
GST_DEBUG_OBJECT (stream->pad,
"moving forwards to keyframe at %u (pts %" GST_TIME_FORMAT " dts %"GST_TIME_FORMAT" )", kf_index,
GST_TIME_ARGS (QTSAMPLE_PTS(stream, &stream->samples[kf_index])),
GST_TIME_ARGS (QTSAMPLE_DTS(stream, &stream->samples[kf_index])));
gst_qtdemux_move_stream (qtdemux, stream, kf_index);
} else {
GST_DEBUG_OBJECT (stream->pad,
"moving forwards, keyframe at %u (pts %" GST_TIME_FORMAT " dts %"GST_TIME_FORMAT" ) already sent", kf_index,
GST_TIME_ARGS (QTSAMPLE_PTS (stream, &stream->samples[kf_index])),
GST_TIME_ARGS (QTSAMPLE_DTS (stream, &stream->samples[kf_index])));
}
} else {
GST_DEBUG_OBJECT (stream->pad,
"moving backwards to keyframe at %u (pts %" GST_TIME_FORMAT " dts %"GST_TIME_FORMAT" )", kf_index,
GST_TIME_ARGS (QTSAMPLE_PTS(stream, &stream->samples[kf_index])),
GST_TIME_ARGS (QTSAMPLE_DTS(stream, &stream->samples[kf_index])));
gst_qtdemux_move_stream (qtdemux, stream, kf_index);
}
/* *INDENT-ON* */
return TRUE;
} | 0 |
linux-stable | c4f4b82694fe48b02f7a881a1797131a6dad1364 | NOT_APPLICABLE | NOT_APPLICABLE | void exit_aio(struct mm_struct *mm)
{
struct kioctx_table *table;
struct kioctx *ctx;
unsigned i = 0;
while (1) {
struct completion requests_done =
COMPLETION_INITIALIZER_ONSTACK(requests_done);
rcu_read_lock();
table = rcu_dereference(mm->ioctx_table);
do {
if (!table || i >= table->nr) {
rcu_read_unlock();
rcu_assign_pointer(mm->ioctx_table, NULL);
if (table)
kfree(table);
return;
}
ctx = table->table[i++];
} while (!ctx);
rcu_read_unlock();
/*
* We don't need to bother with munmap() here -
* exit_mmap(mm) is coming and it'll unmap everything.
* Since aio_free_ring() uses non-zero ->mmap_size
* as indicator that it needs to unmap the area,
* just set it to 0; aio_free_ring() is the only
* place that uses ->mmap_size, so it's safe.
*/
ctx->mmap_size = 0;
kill_ioctx(mm, ctx, &requests_done);
/* Wait until all IO for the context are done. */
wait_for_completion(&requests_done);
}
} | 0 |
Chrome | 5b51043c7c8e7e6b86e68e6d93d95ad24e11cf0e | NOT_APPLICABLE | NOT_APPLICABLE | PrefService* ChromePaymentRequestDelegate::GetPrefService() {
return Profile::FromBrowserContext(web_contents_->GetBrowserContext())
->GetPrefs();
}
| 0 |
Chrome | 16dcd30c215801941d9890859fd79a234128fc3e | NOT_APPLICABLE | NOT_APPLICABLE | void DownloadItemImpl::SetOpenWhenComplete(bool open) {
open_when_complete_ = open;
}
| 0 |
linux | 68faa679b8be1a74e6663c21c3a9d25d32f1c079 | NOT_APPLICABLE | NOT_APPLICABLE | __register_chrdev_region(unsigned int major, unsigned int baseminor,
int minorct, const char *name)
{
struct char_device_struct *cd, *curr, *prev = NULL;
int ret;
int i;
if (major >= CHRDEV_MAJOR_MAX) {
pr_err("CHRDEV \"%s\" major requested (%u) is greater than the maximum (%u)\n",
name, major, CHRDEV_MAJOR_MAX-1);
return ERR_PTR(-EINVAL);
}
if (minorct > MINORMASK + 1 - baseminor) {
pr_err("CHRDEV \"%s\" minor range requested (%u-%u) is out of range of maximum range (%u-%u) for a single major\n",
name, baseminor, baseminor + minorct - 1, 0, MINORMASK);
return ERR_PTR(-EINVAL);
}
cd = kzalloc(sizeof(struct char_device_struct), GFP_KERNEL);
if (cd == NULL)
return ERR_PTR(-ENOMEM);
mutex_lock(&chrdevs_lock);
if (major == 0) {
ret = find_dynamic_major();
if (ret < 0) {
pr_err("CHRDEV \"%s\" dynamic allocation region is full\n",
name);
goto out;
}
major = ret;
}
ret = -EBUSY;
i = major_to_index(major);
for (curr = chrdevs[i]; curr; prev = curr, curr = curr->next) {
if (curr->major < major)
continue;
if (curr->major > major)
break;
if (curr->baseminor + curr->minorct <= baseminor)
continue;
if (curr->baseminor >= baseminor + minorct)
break;
goto out;
}
cd->major = major;
cd->baseminor = baseminor;
cd->minorct = minorct;
strlcpy(cd->name, name, sizeof(cd->name));
if (!prev) {
cd->next = curr;
chrdevs[i] = cd;
} else {
cd->next = prev->next;
prev->next = cd;
}
mutex_unlock(&chrdevs_lock);
return cd;
out:
mutex_unlock(&chrdevs_lock);
kfree(cd);
return ERR_PTR(ret);
} | 0 |
linux | 34b3be18a04ecdc610aae4c48e5d1b799d8689f6 | NOT_APPLICABLE | NOT_APPLICABLE | int sdma_init(struct hfi1_devdata *dd, u8 port)
{
unsigned this_idx;
struct sdma_engine *sde;
struct rhashtable *tmp_sdma_rht;
u16 descq_cnt;
void *curr_head;
struct hfi1_pportdata *ppd = dd->pport + port;
u32 per_sdma_credits;
uint idle_cnt = sdma_idle_cnt;
size_t num_engines = chip_sdma_engines(dd);
int ret = -ENOMEM;
if (!HFI1_CAP_IS_KSET(SDMA)) {
HFI1_CAP_CLEAR(SDMA_AHG);
return 0;
}
if (mod_num_sdma &&
/* can't exceed chip support */
mod_num_sdma <= chip_sdma_engines(dd) &&
/* count must be >= vls */
mod_num_sdma >= num_vls)
num_engines = mod_num_sdma;
dd_dev_info(dd, "SDMA mod_num_sdma: %u\n", mod_num_sdma);
dd_dev_info(dd, "SDMA chip_sdma_engines: %u\n", chip_sdma_engines(dd));
dd_dev_info(dd, "SDMA chip_sdma_mem_size: %u\n",
chip_sdma_mem_size(dd));
per_sdma_credits =
chip_sdma_mem_size(dd) / (num_engines * SDMA_BLOCK_SIZE);
/* set up freeze waitqueue */
init_waitqueue_head(&dd->sdma_unfreeze_wq);
atomic_set(&dd->sdma_unfreeze_count, 0);
descq_cnt = sdma_get_descq_cnt();
dd_dev_info(dd, "SDMA engines %zu descq_cnt %u\n",
num_engines, descq_cnt);
/* alloc memory for array of send engines */
dd->per_sdma = kcalloc_node(num_engines, sizeof(*dd->per_sdma),
GFP_KERNEL, dd->node);
if (!dd->per_sdma)
return ret;
idle_cnt = ns_to_cclock(dd, idle_cnt);
if (idle_cnt)
dd->default_desc1 =
SDMA_DESC1_HEAD_TO_HOST_FLAG;
else
dd->default_desc1 =
SDMA_DESC1_INT_REQ_FLAG;
if (!sdma_desct_intr)
sdma_desct_intr = SDMA_DESC_INTR;
/* Allocate memory for SendDMA descriptor FIFOs */
for (this_idx = 0; this_idx < num_engines; ++this_idx) {
sde = &dd->per_sdma[this_idx];
sde->dd = dd;
sde->ppd = ppd;
sde->this_idx = this_idx;
sde->descq_cnt = descq_cnt;
sde->desc_avail = sdma_descq_freecnt(sde);
sde->sdma_shift = ilog2(descq_cnt);
sde->sdma_mask = (1 << sde->sdma_shift) - 1;
/* Create a mask specifically for each interrupt source */
sde->int_mask = (u64)1 << (0 * TXE_NUM_SDMA_ENGINES +
this_idx);
sde->progress_mask = (u64)1 << (1 * TXE_NUM_SDMA_ENGINES +
this_idx);
sde->idle_mask = (u64)1 << (2 * TXE_NUM_SDMA_ENGINES +
this_idx);
/* Create a combined mask to cover all 3 interrupt sources */
sde->imask = sde->int_mask | sde->progress_mask |
sde->idle_mask;
spin_lock_init(&sde->tail_lock);
seqlock_init(&sde->head_lock);
spin_lock_init(&sde->senddmactrl_lock);
spin_lock_init(&sde->flushlist_lock);
seqlock_init(&sde->waitlock);
/* insure there is always a zero bit */
sde->ahg_bits = 0xfffffffe00000000ULL;
sdma_set_state(sde, sdma_state_s00_hw_down);
/* set up reference counting */
kref_init(&sde->state.kref);
init_completion(&sde->state.comp);
INIT_LIST_HEAD(&sde->flushlist);
INIT_LIST_HEAD(&sde->dmawait);
sde->tail_csr =
get_kctxt_csr_addr(dd, this_idx, SD(TAIL));
tasklet_init(&sde->sdma_hw_clean_up_task, sdma_hw_clean_up_task,
(unsigned long)sde);
tasklet_init(&sde->sdma_sw_clean_up_task, sdma_sw_clean_up_task,
(unsigned long)sde);
INIT_WORK(&sde->err_halt_worker, sdma_err_halt_wait);
INIT_WORK(&sde->flush_worker, sdma_field_flush);
sde->progress_check_head = 0;
timer_setup(&sde->err_progress_check_timer,
sdma_err_progress_check, 0);
sde->descq = dma_alloc_coherent(&dd->pcidev->dev,
descq_cnt * sizeof(u64[2]),
&sde->descq_phys, GFP_KERNEL);
if (!sde->descq)
goto bail;
sde->tx_ring =
kvzalloc_node(array_size(descq_cnt,
sizeof(struct sdma_txreq *)),
GFP_KERNEL, dd->node);
if (!sde->tx_ring)
goto bail;
}
dd->sdma_heads_size = L1_CACHE_BYTES * num_engines;
/* Allocate memory for DMA of head registers to memory */
dd->sdma_heads_dma = dma_alloc_coherent(&dd->pcidev->dev,
dd->sdma_heads_size,
&dd->sdma_heads_phys,
GFP_KERNEL);
if (!dd->sdma_heads_dma) {
dd_dev_err(dd, "failed to allocate SendDMA head memory\n");
goto bail;
}
/* Allocate memory for pad */
dd->sdma_pad_dma = dma_alloc_coherent(&dd->pcidev->dev, sizeof(u32),
&dd->sdma_pad_phys, GFP_KERNEL);
if (!dd->sdma_pad_dma) {
dd_dev_err(dd, "failed to allocate SendDMA pad memory\n");
goto bail;
}
/* assign each engine to different cacheline and init registers */
curr_head = (void *)dd->sdma_heads_dma;
for (this_idx = 0; this_idx < num_engines; ++this_idx) {
unsigned long phys_offset;
sde = &dd->per_sdma[this_idx];
sde->head_dma = curr_head;
curr_head += L1_CACHE_BYTES;
phys_offset = (unsigned long)sde->head_dma -
(unsigned long)dd->sdma_heads_dma;
sde->head_phys = dd->sdma_heads_phys + phys_offset;
init_sdma_regs(sde, per_sdma_credits, idle_cnt);
}
dd->flags |= HFI1_HAS_SEND_DMA;
dd->flags |= idle_cnt ? HFI1_HAS_SDMA_TIMEOUT : 0;
dd->num_sdma = num_engines;
ret = sdma_map_init(dd, port, ppd->vls_operational, NULL);
if (ret < 0)
goto bail;
tmp_sdma_rht = kzalloc(sizeof(*tmp_sdma_rht), GFP_KERNEL);
if (!tmp_sdma_rht) {
ret = -ENOMEM;
goto bail;
}
ret = rhashtable_init(tmp_sdma_rht, &sdma_rht_params);
if (ret < 0) {
kfree(tmp_sdma_rht);
goto bail;
}
dd->sdma_rht = tmp_sdma_rht;
dd_dev_info(dd, "SDMA num_sdma: %u\n", dd->num_sdma);
return 0;
bail:
sdma_clean(dd, num_engines);
return ret;
} | 0 |
Android | aeea52da00d210587fb3ed895de3d5f2e0264c88 | NOT_APPLICABLE | NOT_APPLICABLE | int32_t DownmixLib_Release(effect_handle_t handle) {
downmix_module_t *pDwmModule = (downmix_module_t *)handle;
ALOGV("DownmixLib_Release() %p", handle);
if (handle == NULL) {
return -EINVAL;
}
pDwmModule->context.state = DOWNMIX_STATE_UNINITIALIZED;
free(pDwmModule);
return 0;
}
| 0 |
tensorflow | da8558533d925694483d2c136a9220d6d49d843c | NOT_APPLICABLE | NOT_APPLICABLE | Status KernelAndDeviceOp::Run(
ScopedStepContainer* step_container, const EagerKernelArgs& inputs,
std::vector<EagerKernelRet>* outputs,
CancellationManager* cancellation_manager,
const absl::optional<EagerRemoteFunctionParams>& remote_func_params) {
OpKernelContext::Params params;
params.device = device_;
params.frame_iter = FrameAndIter(0, 0);
params.inputs = inputs.GetTensorValues();
params.op_kernel = kernel_.get();
params.resource_manager = device_->resource_manager();
params.input_alloc_attrs = &input_alloc_attrs_;
params.output_attr_array = output_alloc_attrs_.data();
params.function_library = flr_;
params.slice_reader_cache = &slice_reader_cache_;
params.rendezvous = rendezvous_;
OpExecutionState* op_execution_state = nullptr;
CancellationManager default_cancellation_manager;
if (cancellation_manager) {
params.cancellation_manager = cancellation_manager;
} else if (kernel_->is_deferred()) {
op_execution_state = new OpExecutionState;
params.cancellation_manager = &op_execution_state->cancellation_manager;
params.inc_num_deferred_ops_function = [op_execution_state]() {
op_execution_state->Ref();
};
params.dec_num_deferred_ops_function = [op_execution_state]() {
op_execution_state->Unref();
};
} else {
params.cancellation_manager = &default_cancellation_manager;
}
params.log_memory = log_memory_;
params.runner = get_runner();
params.step_container =
step_container == nullptr ? &step_container_ : step_container;
auto step_container_cleanup = gtl::MakeCleanup([step_container, this] {
if (step_container == nullptr) {
this->step_container_.CleanUp();
}
});
params.collective_executor =
collective_executor_ ? collective_executor_->get() : nullptr;
OpKernelContext context(¶ms);
{
port::ScopedFlushDenormal flush;
port::ScopedSetRound round(FE_TONEAREST);
// 'AnnotatedTraceMe' will trace both scheduling time on host and execution
// time on device of the OpKernel.
profiler::AnnotatedTraceMe activity(
[&] { return kernel_->TraceString(context, /*verbose=*/false); },
profiler::TraceMeLevel::kInfo);
device_->Compute(kernel_.get(), &context);
}
// Clean up execution op_execution_state if deferred ops aren't running.
if (op_execution_state != nullptr) {
op_execution_state->Unref();
}
if (!context.status().ok()) return context.status();
if (outputs != nullptr) {
outputs->clear();
for (int i = 0; i < context.num_outputs(); ++i) {
const auto* output_tensor = context.mutable_output(i);
if (output_tensor != nullptr) {
outputs->push_back(Tensor(*output_tensor));
} else {
outputs->push_back(Tensor());
}
}
}
return Status::OK();
} | 0 |
linux | 0e5cc9a40ada6046e6bc3bdfcd0c0d7e4b706b14 | NOT_APPLICABLE | NOT_APPLICABLE | static int udf_UTF8toCS0(dstring *ocu, struct ustr *utf, int length)
{
unsigned c, i, max_val, utf_char;
int utf_cnt, u_len;
memset(ocu, 0, sizeof(dstring) * length);
ocu[0] = 8;
max_val = 0xffU;
try_again:
u_len = 0U;
utf_char = 0U;
utf_cnt = 0U;
for (i = 0U; i < utf->u_len; i++) {
c = (uint8_t)utf->u_name[i];
/* Complete a multi-byte UTF-8 character */
if (utf_cnt) {
utf_char = (utf_char << 6) | (c & 0x3fU);
if (--utf_cnt)
continue;
} else {
/* Check for a multi-byte UTF-8 character */
if (c & 0x80U) {
/* Start a multi-byte UTF-8 character */
if ((c & 0xe0U) == 0xc0U) {
utf_char = c & 0x1fU;
utf_cnt = 1;
} else if ((c & 0xf0U) == 0xe0U) {
utf_char = c & 0x0fU;
utf_cnt = 2;
} else if ((c & 0xf8U) == 0xf0U) {
utf_char = c & 0x07U;
utf_cnt = 3;
} else if ((c & 0xfcU) == 0xf8U) {
utf_char = c & 0x03U;
utf_cnt = 4;
} else if ((c & 0xfeU) == 0xfcU) {
utf_char = c & 0x01U;
utf_cnt = 5;
} else {
goto error_out;
}
continue;
} else {
/* Single byte UTF-8 character (most common) */
utf_char = c;
}
}
/* Choose no compression if necessary */
if (utf_char > max_val) {
if (max_val == 0xffU) {
max_val = 0xffffU;
ocu[0] = (uint8_t)0x10U;
goto try_again;
}
goto error_out;
}
if (max_val == 0xffffU)
ocu[++u_len] = (uint8_t)(utf_char >> 8);
ocu[++u_len] = (uint8_t)(utf_char & 0xffU);
}
if (utf_cnt) {
error_out:
ocu[++u_len] = '?';
printk(KERN_DEBUG pr_fmt("bad UTF-8 character\n"));
}
ocu[length - 1] = (uint8_t)u_len + 1;
return u_len + 1;
}
| 0 |
Chrome | 5c437bcc7a51edbef45242c5173cf7871fde2866 | NOT_APPLICABLE | NOT_APPLICABLE | bool ExtensionOptionsGuest::ShouldHandleFindRequestsForEmbedder() const {
return true;
}
| 0 |
Chrome | ce1446c00f0fd8f5a3b00727421be2124cb7370f | NOT_APPLICABLE | NOT_APPLICABLE | htmlParseReference(htmlParserCtxtPtr ctxt) {
const htmlEntityDesc * ent;
xmlChar out[6];
const xmlChar *name;
if (CUR != '&') return;
if (NXT(1) == '#') {
unsigned int c;
int bits, i = 0;
c = htmlParseCharRef(ctxt);
if (c == 0)
return;
if (c < 0x80) { out[i++]= c; bits= -6; }
else if (c < 0x800) { out[i++]=((c >> 6) & 0x1F) | 0xC0; bits= 0; }
else if (c < 0x10000) { out[i++]=((c >> 12) & 0x0F) | 0xE0; bits= 6; }
else { out[i++]=((c >> 18) & 0x07) | 0xF0; bits= 12; }
for ( ; bits >= 0; bits-= 6) {
out[i++]= ((c >> bits) & 0x3F) | 0x80;
}
out[i] = 0;
htmlCheckParagraph(ctxt);
if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL))
ctxt->sax->characters(ctxt->userData, out, i);
} else {
ent = htmlParseEntityRef(ctxt, &name);
if (name == NULL) {
htmlCheckParagraph(ctxt);
if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL))
ctxt->sax->characters(ctxt->userData, BAD_CAST "&", 1);
return;
}
if ((ent == NULL) || !(ent->value > 0)) {
htmlCheckParagraph(ctxt);
if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL)) {
ctxt->sax->characters(ctxt->userData, BAD_CAST "&", 1);
ctxt->sax->characters(ctxt->userData, name, xmlStrlen(name));
/* ctxt->sax->characters(ctxt->userData, BAD_CAST ";", 1); */
}
} else {
unsigned int c;
int bits, i = 0;
c = ent->value;
if (c < 0x80)
{ out[i++]= c; bits= -6; }
else if (c < 0x800)
{ out[i++]=((c >> 6) & 0x1F) | 0xC0; bits= 0; }
else if (c < 0x10000)
{ out[i++]=((c >> 12) & 0x0F) | 0xE0; bits= 6; }
else
{ out[i++]=((c >> 18) & 0x07) | 0xF0; bits= 12; }
for ( ; bits >= 0; bits-= 6) {
out[i++]= ((c >> bits) & 0x3F) | 0x80;
}
out[i] = 0;
htmlCheckParagraph(ctxt);
if ((ctxt->sax != NULL) && (ctxt->sax->characters != NULL))
ctxt->sax->characters(ctxt->userData, out, i);
}
}
}
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.